Conversation
When a span has pd_ disaggregation attrs, render colored sub-segments inside the bar showing the time split between phases: - Blue: prefill forward, Green: decode forward - Amber: transfer/transfer queue - Sand/grey: bootstrap queue, prealloc, alloc waiting Tooltip now groups phases by [P] and [D] instance with ms + percentage. Legend row shows PD phase colors when PD data is present. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Span items store attrs as {start_attrs: {...}, end_attrs: {...}} but all
PD visualization code (sub-bars, labels, tooltips, legend) was reading
item.attrs.pd_* at the top level. PD fields set via span.update() end up
in end_attrs, so they were never found.
Add spanFlatAttrs(item) helper that merges start_attrs and end_attrs into
a flat dict, and use it in all 4 call sites: drawSpan PD sub-bars, span
label builder, tooltip PD grouping, and legend PD detection.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Hanyu Zhang <hanyu.zhang@aminer.cn>
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.
The tracer and visualizer are implemented by Hanyu Zhang from Z.ai.