fix: improve Chrome trace event format correctness and metric naming#3688
Draft
andygrove wants to merge 1 commit intoapache:mainfrom
Draft
fix: improve Chrome trace event format correctness and metric naming#3688andygrove wants to merge 1 commit intoapache:mainfrom
andygrove wants to merge 1 commit intoapache:mainfrom
Conversation
- Write memory counter values in bytes instead of MB, with `_bytes`
suffix on the args key, so trace viewers display correct values
- Include the process ID in the trace filename
(`comet-event-trace-{pid}.json`) so each executor writes its own
file instead of corrupting a shared one
- Use the actual process ID in trace events instead of hardcoded `1`
- Replace `.expect()` panics with graceful error handling: the writer
becomes `None` on failure so tracing silently disables itself
- Add `Drop` impl to flush the `BufWriter` on shutdown so buffered
events are not lost at process exit
- Replace fragile `ThreadId` debug-string parsing with
`ThreadId::as_u64().get()` (stable since Rust 1.74)
- Rename `CometUnsafeShuffleWriter` trace event to snake_case
`comet_unsafe_shuffle_writer` for consistency
- Fix `"comet_shuffle_"` metric name (trailing underscore, no thread
ID) in `CometBypassMergeSortShuffleWriter` to match the pattern
used in `CometUnsafeShuffleWriter`
- Rename `jvm_heapUsed` metric to `jvm_heap_used` (snake_case)
- Emit `shuffle_spilled_bytes` counter event after each shuffle spill
e9f4b1e to
4482790
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Which issue does this PR close?
N/A
Rationale for this change
Improve tracing feature.
What changes are included in this PR?
_bytessuffix on the args key, so trace viewers display correct valuescomet-event-trace-{pid}.json) so each executor writes its own file instead of corrupting a shared one1.expect()panics with graceful error handling: the writer becomesNoneon failure so tracing silently disables itselfDropimpl to flush theBufWriteron shutdown so buffered events are not lost at process exitThreadIddebug-string parsing withThreadId::as_u64().get()(stable since Rust 1.74)CometUnsafeShuffleWritertrace event to snake_casecomet_unsafe_shuffle_writerfor consistency"comet_shuffle_"metric name (trailing underscore, no thread ID) inCometBypassMergeSortShuffleWriterto match the pattern used inCometUnsafeShuffleWriterjvm_heapUsedmetric tojvm_heap_used(snake_case)shuffle_spilled_bytescounter event after each shuffle spillHow are these changes tested?