Skip to content
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

[JSON Trace Profile] Add tid to counter series #20300

Conversation

saraadams
Copy link
Contributor

@saraadams saraadams commented Nov 23, 2023

The JSON trace profile includes counter for data such as action count, CPU usage, memory usage.
The code for writing the events to include these was refactored in a03674e As part of that change the events written no longer include a tid (thread ID). However, each event in the JSON trace profile is expected to include a tid, as documented in
https://docs.google.com/document/d/1CvAClvFfyA5R-PhYUmn5OOQtYMH4h6I0nSsKchNAySU/preview#heading=h.uxpopqvbjezh

This change ensures the counter series events again have a tid, using the current thread's ID. This is consistent with the behavior that was present before the refactor.

In response to #18548 (comment)
Fixes EngFlow/bazel_invocation_analyzer#113

The JSON trace profile includes counter for data such as
action count, CPU usage, memory usage.
The code for writing the events to include these was refactored in
bazelbuild@a03674e
As part of that change the events written no longer include a
`tid` (thread ID). However, each event in the JSON trace profile is expected to
include a `tid`, as documented in
https://docs.google.com/document/d/1CvAClvFfyA5R-PhYUmn5OOQtYMH4h6I0nSsKchNAySU/preview#heading=h.uxpopqvbjezh

This change ensures the counter series events again have a `tid`, using
the current thread's ID. This is consistent with the behavior that was present before
the refactor.

In response to bazelbuild#18548 (comment)
@github-actions github-actions bot added team-Performance Issues for Performance teams awaiting-review PR is awaiting review from an assigned reviewer labels Nov 23, 2023
@saraadams
Copy link
Contributor Author

@meisterT Here's a suggested patch for #18548 (comment)

@ulfjack
Copy link
Contributor

ulfjack commented Nov 27, 2023

Adding some people for visibility. It would be good to get this into 7 (because it fixes a regression).

@tjgq
Copy link
Contributor

tjgq commented Nov 27, 2023

@bazel-io fork 7.0.0

@keertk keertk added awaiting-PR-merge PR has been approved by a reviewer and is ready to be merge internally and removed awaiting-review PR is awaiting review from an assigned reviewer labels Nov 27, 2023
@github-actions github-actions bot removed the awaiting-PR-merge PR has been approved by a reviewer and is ready to be merge internally label Nov 27, 2023
bazel-io pushed a commit to bazel-io/bazel that referenced this pull request Nov 27, 2023
The JSON trace profile includes counter for data such as action count, CPU usage, memory usage.
The code for writing the events to include these was refactored in bazelbuild@a03674e As part of that change the events written no longer include a `tid` (thread ID). However, each event in the JSON trace profile is expected to include a `tid`, as documented in
https://docs.google.com/document/d/1CvAClvFfyA5R-PhYUmn5OOQtYMH4h6I0nSsKchNAySU/preview#heading=h.uxpopqvbjezh

This change ensures the counter series events again have a `tid`, using the current thread's ID. This is consistent with the behavior that was present before the refactor.

In response to bazelbuild#18548 (comment)
Fixes EngFlow/bazel_invocation_analyzer#113

Closes bazelbuild#20300.

PiperOrigin-RevId: 585636103
Change-Id: I2aa1ff1e656324410d120ff5b6071028b0a5dce3
keertk pushed a commit that referenced this pull request Nov 27, 2023
The JSON trace profile includes counter for data such as action count,
CPU usage, memory usage.
The code for writing the events to include these was refactored in
a03674e
As part of that change the events written no longer include a `tid`
(thread ID). However, each event in the JSON trace profile is expected
to include a `tid`, as documented in

https://docs.google.com/document/d/1CvAClvFfyA5R-PhYUmn5OOQtYMH4h6I0nSsKchNAySU/preview#heading=h.uxpopqvbjezh

This change ensures the counter series events again have a `tid`, using
the current thread's ID. This is consistent with the behavior that was
present before the refactor.

In response to
#18548 (comment)
Fixes EngFlow/bazel_invocation_analyzer#113

Closes #20300.

Commit
16acadb

PiperOrigin-RevId: 585636103
Change-Id: I2aa1ff1e656324410d120ff5b6071028b0a5dce3

Co-authored-by: Sara Adams <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
team-Performance Issues for Performance teams
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cannot find action count in newer profiles
4 participants