)]}'
{
  "commit": "7d3e533a92da43aeddc91d78bb1b7bfeb461a705",
  "tree": "0ce33676e97f96b7747af94ea73929d0e6ab60df",
  "parents": [
    "8e0ff851bb9bd8acbe773f97d678b235443e105c"
  ],
  "author": {
    "name": "nharmata",
    "email": "nharmata@google.com",
    "time": "Wed Dec 22 11:33:42 2021 -0800"
  },
  "committer": {
    "name": "Copybara-Service",
    "email": "copybara-worker@google.com",
    "time": "Wed Dec 22 11:34:50 2021 -0800"
  },
  "message": "Refactor `RetainedHeapLimiter` into (i) a general purpose mechanism for noticing memory pressure and (ii) a use of that mechanism to achieve the actual goal of `RetainedHeapLimiter`.\n\nThis accomplishes two things:\n\n* Strict decrease in code complexity.\n  * By using a custom `BlazeModule`, we can get rid of the special-casing in `BlazeCommandDispatcher` and `BlazeRuntime`.\n  * The new `RetainedHeapLimiter` is simpler since the code for noticing memory pressure has been factored out. Check out the unit tests :)\n* Opens the door for new functionality triggered by memory pressure. I will be adding one myself in the very near future. And I can imagine other pieces of functionality we can add too.\n\nPiperOrigin-RevId: 417856795\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "8b7d2ecbd0af9e9a7b6927523a8c6dd08622c216",
      "old_mode": 33188,
      "old_path": "src/main/java/com/google/devtools/build/lib/BUILD",
      "new_id": "5f20f1865b5214be7ca47e9b32721124db60ce01",
      "new_mode": 33188,
      "new_path": "src/main/java/com/google/devtools/build/lib/BUILD"
    },
    {
      "type": "modify",
      "old_id": "11ad22ea8ce69ca158d6f7f22c4d6209ada0de20",
      "old_mode": 33188,
      "old_path": "src/main/java/com/google/devtools/build/lib/bazel/Bazel.java",
      "new_id": "54180cf4f5a6f55a240ba458d5b9b9d70c835787",
      "new_mode": 33188,
      "new_path": "src/main/java/com/google/devtools/build/lib/bazel/Bazel.java"
    },
    {
      "type": "modify",
      "old_id": "e7a0ce81a1fb4d5518224e5e108d41cb0a5365a3",
      "old_mode": 33188,
      "old_path": "src/main/java/com/google/devtools/build/lib/runtime/BlazeCommandDispatcher.java",
      "new_id": "475850e4f6ac0a64e9933835fc65bdc58b45021c",
      "new_mode": 33188,
      "new_path": "src/main/java/com/google/devtools/build/lib/runtime/BlazeCommandDispatcher.java"
    },
    {
      "type": "modify",
      "old_id": "50d7f1b75bac2325b16f65e1e9df433058d9b1d4",
      "old_mode": 33188,
      "old_path": "src/main/java/com/google/devtools/build/lib/runtime/BlazeRuntime.java",
      "new_id": "b49fd0e587f36bd58f1b233cd09d041e3f94952f",
      "new_mode": 33188,
      "new_path": "src/main/java/com/google/devtools/build/lib/runtime/BlazeRuntime.java"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "8f3ec4ec65bee6cee2c9a8eee1343e47e82e6a66",
      "new_mode": 33188,
      "new_path": "src/main/java/com/google/devtools/build/lib/runtime/MemoryPressureHandler.java"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "c3c70b9672eb99765f81f6a9d14f290259dcd0dd",
      "new_mode": 33188,
      "new_path": "src/main/java/com/google/devtools/build/lib/runtime/MemoryPressureListener.java"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "d2edd150fd5bd1604fcd2db6d2241bcfacf3cf20",
      "new_mode": 33188,
      "new_path": "src/main/java/com/google/devtools/build/lib/runtime/MemoryPressureModule.java"
    },
    {
      "type": "modify",
      "old_id": "34224df92b67864d69e3046d7e4cea993d10a8b4",
      "old_mode": 33188,
      "old_path": "src/main/java/com/google/devtools/build/lib/runtime/RetainedHeapLimiter.java",
      "new_id": "102b2b3b5d64425cb156577deb9aa8a648020539",
      "new_mode": 33188,
      "new_path": "src/main/java/com/google/devtools/build/lib/runtime/RetainedHeapLimiter.java"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "605ac6ca17c68291634994136a63b8cc12b3fec1",
      "new_mode": 33188,
      "new_path": "src/test/java/com/google/devtools/build/lib/runtime/MemoryPressureListenerTest.java"
    },
    {
      "type": "modify",
      "old_id": "1df76ef53b94d1cd0f9d259559c425a72fe9dba5",
      "old_mode": 33188,
      "old_path": "src/test/java/com/google/devtools/build/lib/runtime/RetainedHeapLimiterTest.java",
      "new_id": "d06335666e4263137ffb378265b6beb2abceae1c",
      "new_mode": 33188,
      "new_path": "src/test/java/com/google/devtools/build/lib/runtime/RetainedHeapLimiterTest.java"
    }
  ]
}
