Skip to content

chore(test): instrument DataProcessingSpec with per-test timing log#4677

Closed
Yicong-Huang wants to merge 1 commit into
apache:mainfrom
Yicong-Huang:chore/dpspec-per-test-timing
Closed

chore(test): instrument DataProcessingSpec with per-test timing log#4677
Yicong-Huang wants to merge 1 commit into
apache:mainfrom
Yicong-Huang:chore/dpspec-per-test-timing

Conversation

@Yicong-Huang
Copy link
Copy Markdown
Contributor

What changes were proposed in this PR?

Draft / diagnostic — wrap `DataProcessingSpec.withFixture` with a nano-timer and dump a sorted per-test elapsed-time table in `afterAll`.

`DataProcessingSpec` is the dominant contributor to scala test wall time on a typical main-push run (its 16 e2e workflow tests run for the full ~6 minute test phase, with each test bounded by a 1-minute `Await`). Without per-test numbers there is no way to decide which workflows to consolidate or delete.

This change is intended to land long enough to gather one CI run's worth of timings; once the slow tests are identified (#4670 follow-up), this instrumentation is expected to be removed or rewritten as a stricter timeout per test.

```
[info] DataProcessingSpec per-test timings (sorted desc, total NNNNms across 16 tests):
[info] XXXXXms Engine should execute csv->keyword->averageAndGroupBy workflow normally
[info] ...
```

Any related issues, documentation, discussions?

Diagnostic for the scala build wall-time discussion. Findings will feed a follow-up that either consolidates redundant e2e workflows or fixes the underlying retry flake the suite documents.

How was this PR tested?

No new tests. The instrumentation runs as part of the existing `DataProcessingSpec` execution under the python/scala/agent-service `Build` matrix. After this PR's CI run, the scala job log under `build / scala (ubuntu-22.04, 11)` will contain the sorted timing table.

Was this PR authored or co-authored using generative AI tooling?

Generated-by: Claude Code (Opus 4.7, 1M context)

Wrap withFixture with a nano-timer; in afterAll, info() the per-test
elapsed time sorted descending. Diagnostic for apache#4670 follow-up — the
suite is the dominant contributor to scala test phase wall time, and
we need a per-test breakdown to decide what to consolidate or remove.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@Yicong-Huang
Copy link
Copy Markdown
Contributor Author

Closing — will gather timings locally instead of through CI.

@Yicong-Huang Yicong-Huang deleted the chore/dpspec-per-test-timing branch May 2, 2026 09:24
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented May 2, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 53.02%. Comparing base (8841990) to head (6ec0a63).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #4677      +/-   ##
============================================
+ Coverage     52.46%   53.02%   +0.56%     
- Complexity        0     1995    +1995     
============================================
  Files           353      817     +464     
  Lines         21338    24630    +3292     
  Branches       1791     1921     +130     
============================================
+ Hits          11195    13061    +1866     
- Misses        10026    10914     +888     
- Partials        117      655     +538     
Flag Coverage Δ
agent-service ?
frontend ?
python 85.05% <ø> (ø)
scala 38.17% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants