ci: add test duration tracking workflow#4575
Open
hsuan-lun-chiang wants to merge 1 commit into
Open
Conversation
hsuan-lun-chiang
requested review from
A9isha,
NuojCheng,
RissyRan,
SurbhiJainUSC,
abhinavclemson,
aireenmei,
bvandermoon,
darisoy,
dipannita08,
gagika,
gobbleturk,
hengtaoguo,
huytransformer,
igorts-git,
jiangjy1982,
khatwanimohit,
parambole,
richjames0,
shralex,
suexu1025,
vipannalla and
xibinliu
as code owners
July 23, 2026 07:22
|
Caution The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR implements a comprehensive automated mechanism to detect and prevent test suite run-time inflation before code is merged into
main, addressing the need for a fast, reliable, and responsive CI pipeline.How the Workflow Works:
When a PR is opened or updated, the pipeline runs the standard test suites (CPU, GPU, TPU) and generates JUnit XML reports. Once those tests complete, the new
track_performancejob runs and does the following:enforce_test_limits.pyto parse the XML reports and ensures no individual test function regresses significantly compared to its stored baseline. The fine-grained baseline (per_test_baseline.json) is maintained directly on thegh-pagesbranch.parse_junit_to_benchmark.pyto aggregate the total runtime for each device. It then usesgithub-action-benchmarkto compare these aggregated total runtimes against the baseline stored on thegh-pagesbranch to prevent overall suite inflation.Changes Made:
Macro-Level Suite Tracking (
gh-pages):github-action-benchmarkto track macro-level execution times (suite/shard level).tests/utils/parse_junit_to_benchmark.pyto convert JUnit XML test results into the JSON format required by the benchmark action.gh-pagesbranch for historical trend visualization.Micro-Level Individual Test Tracking:
per_test_baseline.jsondictionary containing the execution times of individual test functions to thegh-pagesbranch.Regression Enforcement:
tests/utils/enforce_test_limits.pyto automatically flag and block any test that significantly regresses compared to its stored per-test baseline.Tests
github-action-benchmarkin CI.enforce_test_limits.pyin CI to ensure that test jitter thresholds are accurately tuned.Checklist
Before submitting this PR, please make sure (put X in square brackets):
gemini-reviewlabel.(Note: Re-created from PR #4290 to reset Copybara import status)