[BEP] timingBreakdown is empty (except for executionWallTime) for local execution
- Dominant language
- Java
- Stars
- 25.8k
- Forks
- 4.6k
- Avg merge
- 2d 20h
- Merged PRs (30d)
- 72
Description
### Description of the bug:
When running tests locally and collecting BEP events using `--build_event_*_file` there is o timing information that could help determine when the test actually started to run (after being scheduled).
The expectation was (after inspecting BEP proto) that the `timingBreakdown` field would contain this info.
We are creating traces from BEP and this info would be very useful as currently you only get:
* The start time (which is not really the start time of the execution but when the execution was scheduled)
* Duration (duration of the execution)
Example:
```
"executionInfo": {
"strategy": "darwin-sandbox",
"timingBreakdown": {
"child": [
{
"name": "parseTime",
"time": "0s"
},
{
"name": "fetchTime",
"time": "0s"
},
{
"name": "queueTime",
"time": "0s"
},
{
"name": "uploadTime",
"time": "0s"
},
{
"name": "setupTime",
"time": "0s"
},
{
"name": "executionWallTime",
"time": "2.761s"
},
{
"name": "processOutputsTime",
"time": "0s"
},
{
"name": "networkTime",
"time": "0s"
}
],
"name": "totalTime",
"time": "2.761s"
}
},
"testAttemptStart": "2024-07-08T22:04:08.528Z",
"testAttemptDuration": "2.761s"
}
```
Did not try with remote (as I cannot easily test it), if it is even available there. Tried searching it there is some specific flag that needs to be enabled to collect this info but did not find anything.
### Which category does this issue belong to?
Core
### What's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
1. `bazel test //some/path/... --build_event_json_file=events.json --cache_test_results=no --local_test_jobs=1`
2. Open `events.json` and look for `testResult.executionInfo.timingBreakdown`
3. All timings except for `executionWallTime` are zero
### Which operating system are you running Bazel on?
MacOS
### What is the output of `bazel info release`?
release 7.2.1
### If `bazel info release` returns `development version` or `(@non-git)`, tell us how you built Bazel.
_No response_
### What's the output of `git remote get-url origin; git rev-parse HEAD` ?
_No response_
### If this is a regression, please try to identify the Bazel commit where the bug was introduced with bazelisk --bisect.
_No response_
### Have you found anything relevant by searching the web?
_No response_
### Any other information, logs, or outputs that you want to share?
_No response_
Contributor guide
Research direction
Start by running the reported bazel test command with --build_event_json_file and inspect testResult.executionInfo.timingBreakdown in events.json. Trace local test execution timing into the BEP TestResult entry; done means the relevant timing fields are populated for local execution rather than only executionWallTime.
Written by the indexing model from the issue text.
Assessment
- Domain
- build-system, testing
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100