)]}'
{
  "commit": "d0aec5864e636f9f749699fd7495d18a8d73844e",
  "tree": "4d3de3197e1de614bb6ec5bc00489c30210db8e9",
  "parents": [
    "c7ffaf80713afbe5a4f4d95a605c0a98084374de"
  ],
  "author": {
    "name": "Matt Stark",
    "email": "msta@google.com",
    "time": "Thu Aug 20 15:09:21 2026 +1000"
  },
  "committer": {
    "name": "gn-scoped@luci-project-accounts.iam.gserviceaccount.com",
    "email": "gn-scoped@luci-project-accounts.iam.gserviceaccount.com",
    "time": "Tue Aug 25 20:29:02 2026 -0700"
  },
  "message": "Create a trace comparison tool to evaluate the performance impact of a change.\n\nOn many occasions, it\u0027s useful to understand the performance impact of a\nchange to GN. In particular, when investigating changes like making ninja\nfiles per directory instead of per target, overall build times can be noisy\nand hard to measure reliably.\n\n`tools/compare_traces.py` compares Chrome trace logs from `gn gen --tracelog`\nruns to isolate the performance impact on specific build files and phases.\nBy averaging multiple runs and filtering out noise, it can show when a change\nreliably affects a specific part of the build even if the overall wall-clock\ndifference is small.\n\nExample - I modified gn to sleep for 5 seconds while loading\n//chrome/browser/BUILD.gn, then got the following results:\n\n$ tools/compare_traces.py --before before_1.trace before_2.trace \\\n  before_3.trace --after after_1.trace after_2.trace after_3.trace\n\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\n GN PERFORMANCE IMPACT REPORT\n\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\nSamples:  Before: 3 run(s) | After: 3 run(s)\n\nEXECUTIVE VERDICT\n--------------------------------------------------------------------------------------\n  ⚠️  REGRESSION DETECTED: Slower by +2,420 ms (+67.6%)\n\n  • Wall-clock / run:  Before:    3,577 ± 365 ms  -\u003e  After:     5,997 ± 17 ms\n  • Total CPU / run:   Before: 64,738 ± 4,101 ms  -\u003e  After: 76,680 ± 1,848 ms\n  • Events / run:      Before:           152,059  -\u003e  After:           152,059  (Δ +0)\n\nAFFECTED GN PHASES (Ranked by impact)\n--------------------------------------------------------------------------------------\n Delta (ms)  Delta (%)      Before       After  Name\n--------------------------------------------------------------------------------------\n  +6,167 ms    +31.5%   19,584 ms   25,752 ms  BUILD.gn Execution\n     +26 ms     +4.1%      634 ms      660 ms  External Scripts\n\nAFFECTED SUBSYSTEMS (Ranked by impact)\n--------------------------------------------------------------------------------------\n Delta (ms)  Delta (%)      Before       After  Name\n--------------------------------------------------------------------------------------\n     -22 ms    -65.8%       33 ms       11 ms  //remoting/base\n\nAFFECTED BUILD FILES (Ranked by impact)\n--------------------------------------------------------------------------------------\n Delta (ms)  Delta (%)      Before       After  Name\n--------------------------------------------------------------------------------------\n  +4,940 ms  +7093.8%       70 ms    5,009 ms  //chrome/browser/BUILD.gn\n     +25 ms    +19.8%      124 ms      149 ms  //chrome/test/BUILD.gn\n     +24 ms    +84.1%       28 ms       52 ms  //components/omnibox/browser/BUILD.gn\n     -22 ms    -68.5%       32 ms       10 ms  //remoting/base/BUILD.gn\n     -21 ms    -69.8%       30 ms        9 ms  //ui/gl/mojom/BUILD.gn\n     -20 ms    -66.8%       30 ms       10 ms  //remoting/protocol/BUILD.gn\n     +10 ms    +31.7%       30 ms       40 ms  //extensions/browser/BUILD.gn\n     -12 ms    -37.8%       32 ms       20 ms  //ui/accessibility/mojom/BUILD.gn\n\nChange-Id: Ie31079d5836559d850d61692021b1e346a6a6964\nReviewed-on: https://gn-review.googlesource.com/c/gn/+/25680\nCommit-Queue: Matt Stark \u003cmsta@google.com\u003e\nReviewed-by: Takuto Ikuta \u003ctikuta@google.com\u003e\n",
  "tree_diff": [
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "08de08cfd035ca06636846698516560c995988b1",
      "new_mode": 33261,
      "new_path": "tools/compare_traces.py"
    }
  ]
}
