)]}'
{
  "commit": "04625ad4886a478bf74bbfc13937c10fa63eb272",
  "tree": "ba39988adb170b2e6e744ab304de7f8846a4d444",
  "parents": [
    "eb7d335641ec1b9c91c1609a94cb1cbdba1d3987"
  ],
  "author": {
    "name": "Yi Jin",
    "email": "jinyithu@google.com",
    "time": "Tue Oct 17 18:29:33 2017 -0700"
  },
  "committer": {
    "name": "Yi Jin",
    "email": "jinyithu@google.com",
    "time": "Tue Oct 31 16:54:38 2017 -0700"
  },
  "message": "Refactor incident_helper to use protoutil and cppstream plugin.\n\n1. Split the parsers to its own file to prevent all the parsers in one\ngaint file.\n\n2. Completely get rid of protobuf-cpp-full in incident_helper, use\nProtoOutputStream and cppstream instead, the incident_helper binary is\nreduced from ~500K to ~113K.\n\n3. Write data to protobuf even its values are zero/default, the reason\nis for example we have a repeated int32 orders \u003d 1; and people\nexplicitly append 0 so the total repeated field has 10 values, if zero\nis not written to serialized data, this repeated field will only have 9\nvalues which is not what we want at first place. This also aligns with\nthe default protobuf serialization behavior in incident_helper_test.\n\n4. Use Android.bp for protoutil lib since it is not able to depend on\nlibs compiled by .mk file, it works the other way.\n\n5. Add a new custom message option for streaming_proto, if specified,\nthe cppstream will create extra metadata to get field ids by field name.\nA Table class is created in incident_helper to use it.\n\nBug: 67860303\nTest: unit tested as well as on device test\nChange-Id: I8e136fd15f343a4a623d20910ec64b622b478a3e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "c89cc400171d0e0054407c76fcea2cdf966237c3",
      "old_mode": 33188,
      "old_path": "Android.bp",
      "new_id": "5c1ccb7cc639f29b0997031cb39aa19351e7ca06",
      "new_mode": 33188,
      "new_path": "Android.bp"
    },
    {
      "type": "modify",
      "old_id": "9843f175bf2dfedaff22a3449b484944ecffdb46",
      "old_mode": 33188,
      "old_path": "Android.mk",
      "new_id": "1ed8a25066001ed87f8115026d698682bc467590",
      "new_mode": 33188,
      "new_path": "Android.mk"
    },
    {
      "type": "modify",
      "old_id": "053208313b00b0f2a4a342386cd9d139398047e2",
      "old_mode": 33188,
      "old_path": "cmds/incident_helper/Android.bp",
      "new_id": "2ef037143f07d0b9cb265b3727841beece6cbe7c",
      "new_mode": 33188,
      "new_path": "cmds/incident_helper/Android.bp"
    },
    {
      "type": "delete",
      "old_id": "7b06d42cbb551737adad504240321cd1e707b58c",
      "old_mode": 33188,
      "old_path": "cmds/incident_helper/IncidentHelper.cpp",
      "new_id": "0000000000000000000000000000000000000000",
      "new_mode": 0,
      "new_path": "/dev/null"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "a8f9968ee8f6f37deec010e8e3ae783d4864e4ad",
      "new_mode": 33188,
      "new_path": "cmds/incident_helper/src/TextParserBase.cpp"
    },
    {
      "type": "rename",
      "old_id": "d24d7173aa26ad9d3905822ac154761fce4308dd",
      "old_mode": 33188,
      "old_path": "cmds/incident_helper/IncidentHelper.h",
      "new_id": "c41612de4eb301823876f945e688ed5684100992",
      "new_mode": 33188,
      "new_path": "cmds/incident_helper/src/TextParserBase.h",
      "score": 64
    },
    {
      "type": "rename",
      "old_id": "2ab4b54e193f4f453cc0a56c18d208dcd7f853b8",
      "old_mode": 33188,
      "old_path": "cmds/incident_helper/ih_util.cpp",
      "new_id": "c7d1ca231a03f11fbe2346b8c95c1c672b3cf540",
      "new_mode": 33188,
      "new_path": "cmds/incident_helper/src/ih_util.cpp",
      "score": 73
    },
    {
      "type": "rename",
      "old_id": "ce5baeef0dc3d117009e264a8a04bdd4c90d879d",
      "old_mode": 33188,
      "old_path": "cmds/incident_helper/ih_util.h",
      "new_id": "86761e93f49c502556d72302dc045a60141d839b",
      "new_mode": 33188,
      "new_path": "cmds/incident_helper/src/ih_util.h",
      "score": 79
    },
    {
      "type": "rename",
      "old_id": "52ff77720d708d50694f3449cd627487540ca712",
      "old_mode": 33188,
      "old_path": "cmds/incident_helper/main.cpp",
      "new_id": "3da87b9c801b5c88ae1a87261b0e479e038e4c3d",
      "new_mode": 33188,
      "new_path": "cmds/incident_helper/src/main.cpp",
      "score": 96
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "cc4a1e1ecfa2c092024797f09863176df92196a1",
      "new_mode": 33188,
      "new_path": "cmds/incident_helper/src/parsers/KernelWakesParser.cpp"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "aabab7c64a4f6ebd3c5b93fa36a4d0171869382d",
      "new_mode": 33188,
      "new_path": "cmds/incident_helper/src/parsers/KernelWakesParser.h"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "6047bd189b95a5a7b8f437756e04a5de1baf75c3",
      "new_mode": 33188,
      "new_path": "cmds/incident_helper/src/parsers/PageTypeInfoParser.cpp"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "fb84d912a5f251b619b11e0b12c9aeab85bdf24c",
      "new_mode": 33188,
      "new_path": "cmds/incident_helper/src/parsers/PageTypeInfoParser.h"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "93f970f820d9721b1fc5415562a81cbe2d149634",
      "new_mode": 33188,
      "new_path": "cmds/incident_helper/src/parsers/ProcrankParser.cpp"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "5d0ee48aa5b1a69e132138e12842b919c6fded60",
      "new_mode": 33188,
      "new_path": "cmds/incident_helper/src/parsers/ProcrankParser.h"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "a51926e70def8467eee367534c41bad47454daef",
      "new_mode": 33188,
      "new_path": "cmds/incident_helper/testdata/kernel_wakeups_short.txt"
    },
    {
      "type": "delete",
      "old_id": "c44a163efa1152fd44247317fc882ebefc3893c4",
      "old_mode": 33188,
      "old_path": "cmds/incident_helper/tests/IncidentHelper_test.cpp",
      "new_id": "0000000000000000000000000000000000000000",
      "new_mode": 0,
      "new_path": "/dev/null"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "a8fa62088450d03d4947f642b57666bc06835908",
      "new_mode": 33188,
      "new_path": "cmds/incident_helper/tests/KernelWakesParser_test.cpp"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "de64e70c80c7db6fbceec5fc63b913e9e3cef5f8",
      "new_mode": 33188,
      "new_path": "cmds/incident_helper/tests/PageTypeInfoParser_test.cpp"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "e86647ad479bd939e44d0cd8e0a73b26cd55f36b",
      "new_mode": 33188,
      "new_path": "cmds/incident_helper/tests/ProcrankParser_test.cpp"
    },
    {
      "type": "modify",
      "old_id": "12649e1f0ab2a12a898942602535572ce30fd4d0",
      "old_mode": 33188,
      "old_path": "core/proto/android/os/kernelwake.proto",
      "new_id": "d032a452c14e6683ecbde8aeb453bc9f5d7a14c3",
      "new_mode": 33188,
      "new_path": "core/proto/android/os/kernelwake.proto"
    },
    {
      "type": "modify",
      "old_id": "f82ea7672879a1969420b45f9ff69651fc48cbc2",
      "old_mode": 33188,
      "old_path": "core/proto/android/os/pagetypeinfo.proto",
      "new_id": "22b3d730f1a1d95c8cb5073f010e4570fb90e352",
      "new_mode": 33188,
      "new_path": "core/proto/android/os/pagetypeinfo.proto"
    },
    {
      "type": "modify",
      "old_id": "ab6a6a32f69861f57582326c5ed87664be911b4f",
      "old_mode": 33188,
      "old_path": "core/proto/android/os/procrank.proto",
      "new_id": "4d62a60c83450010b5012bcac9a51987308132b1",
      "new_mode": 33188,
      "new_path": "core/proto/android/os/procrank.proto"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "4f1d2d5a4fe5e88f71b116c052fd32044f648b9c",
      "new_mode": 33188,
      "new_path": "libs/protoutil/Android.bp"
    },
    {
      "type": "delete",
      "old_id": "2a2b087dc03274fa5aa97da06f5b712641e4e3af",
      "old_mode": 33188,
      "old_path": "libs/protoutil/Android.mk",
      "new_id": "0000000000000000000000000000000000000000",
      "new_mode": 0,
      "new_path": "/dev/null"
    },
    {
      "type": "modify",
      "old_id": "b8415b2e264b4afb7effeb09970a463d81660b0b",
      "old_mode": 33188,
      "old_path": "libs/protoutil/include/android/util/ProtoOutputStream.h",
      "new_id": "2155084db534e7e38f8cb8b58d82e65b0d3f35f7",
      "new_mode": 33188,
      "new_path": "libs/protoutil/include/android/util/ProtoOutputStream.h"
    },
    {
      "type": "modify",
      "old_id": "b91e3db0e39ca31466a81f88d2a203491440b6b6",
      "old_mode": 33188,
      "old_path": "libs/protoutil/src/ProtoOutputStream.cpp",
      "new_id": "9d8ee729a80dcb16ef7a5e6c63ba5e1d343a7bba",
      "new_mode": 33188,
      "new_path": "libs/protoutil/src/ProtoOutputStream.cpp"
    },
    {
      "type": "modify",
      "old_id": "756549c5e880c7a4a511e29ca265eaf397e35675",
      "old_mode": 33188,
      "old_path": "tools/streaming_proto/Android.bp",
      "new_id": "96e060d0fc26dc91c2d5cbaafbfde31ef6e555b4",
      "new_mode": 33188,
      "new_path": "tools/streaming_proto/Android.bp"
    },
    {
      "type": "modify",
      "old_id": "d4e1b7aede92f071003fab4f886c188f7257b60e",
      "old_mode": 33188,
      "old_path": "tools/streaming_proto/cpp/main.cpp",
      "new_id": "dc96d5c54c166863b1cf3981b26117ead6a3aef4",
      "new_mode": 33188,
      "new_path": "tools/streaming_proto/cpp/main.cpp"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "123506c03cfd306fce9041cd9f22d15662524d24",
      "new_mode": 33188,
      "new_path": "tools/streaming_proto/stream.proto"
    }
  ]
}
