bazelbuild / bazelbuild/bazel

Discrepancy between the elapsed time reported by Bazel and the profile duration

Open
#23,782 1 comment 0 reactions 0 assignees View on GitHub
P2 team-Remote-Exec type: bug
Dominant language
Java
Stars
25.8k
Forks
4.6k
Avg merge
2d 16h
Merged PRs (30d)
72

Description

### Description of the bug:

Consider this invocation: https://btx.cloud.google.com/invocations/7f6a08b3-606a-44f5-99aa-6521a88de319/log

The elapsed time as logged is a little over 7 minutes:

```
INFO: Elapsed time: 428.388s, Critical Path: 11.30s
```

However, when I upload the `command.profile.gz` (available in the Invocation Artifacts tab) to Perfetto, I see only about 4 minutes and 30 seconds of profile data: https://ui.perfetto.dev/#!/?s=b032b2b7f81070f86acb8f0fcfa831a0397898a5

@tjgq

### Which category does this issue belong to?

Remote Execution

### What's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.

_No response_

### Which operating system are you running Bazel on?

MacOS

### What is the output of `bazel info release`?

development version

### If `bazel info release` returns `development version` or `(@non-git)`, tell us how you built Bazel.

I'm using `1ff5af18d045e8f30a2a0367470db4e8225a785c`, fetched by Bazelisk via `.bazelversion`.

### 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

Open the contributing guide

Research direction

Start with the linked invocation log and its command.profile.gz from the Invocation Artifacts tab, then inspect the trace in Perfetto and compare its duration with Bazel's logged elapsed time. Done means locating why the reported intervals differ and documenting or testing a consistent duration for the remote-execution profile.

Written by the indexing model from the issue text.

Assessment

Domain
build-system, distributed-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.