-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
profile_finish_ts actually describes profile start timestamp #22505
Comments
Great spot. I think I misunderstood the ordering in my original PR. Im totally in favor of changing this field to In term of precision, I don't mind changing the implementation to Date as long as the local timezone is removed. My original intention wass to create a field that could be easily consumed by processing scripts without having to worry about timezones. side note: I think I worked on this while using Bazel+JDK8 with profiles being created from Linux and MacOS. |
I'm perfectly fine with the |
Also, you can get better precision for the numeric field if you do |
@timothyg-stripe it seems like you have a fix for this ready. Do you want to submit a PR for this? |
Sorry, I don't think I'll have time to fix this. |
As reported in bazelbuild#22505, I misread the initial implemenation and named this field wrongly. Given there has been no report about this before this issue, it's safe to assume that the field is not widely used by other folks and therefore, is safe to change. Closes bazelbuild#22505.
Description of the bug:
#17636 adds a new field in Bazel profiles called
profile_finish_ts
. But the name is a misnomer: it actually describes the starting timestamp of the profile.Which category does this issue belong to?
Performance
What's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
Which operating system are you running Bazel on?
Linux
What is the output of
bazel info release
?release 7.1.2
If
bazel info release
returnsdevelopment 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
Is this a regression? If yes, please try to identify the Bazel commit where the bug was introduced.
No response
Have you found anything relevant by searching the web?
#17636 says:
But this is actually just wrong, at least in the current version of Bazel. The timestamp is captured near the beginning of
JsonTraceFileWriter#run
, which is called when theJsonTraceFileWriter
thread starts running. Tracing through the code we see:The position of the call in
runtime.BlazeCommandDispatcher#execExclusively
is clearly before anything important has started.Additionally,
profile_finish_ts
also lacks precision compared to thedate
field it's supposed to replace, being truncated to the nearest second whiledate
has microsecond precision on modern Linux.Any other information, logs, or outputs that you want to share?
No response
The text was updated successfully, but these errors were encountered: