Make colour handling more consistent in the HTML instrumentation report#209
Merged
AlexJones0 merged 2 commits intoMay 21, 2026
Merged
Conversation
machshev
approved these changes
May 21, 2026
Collaborator
machshev
left a comment
There was a problem hiding this comment.
Nice, thanks @AlexJones0!
There is already a common utility for repeating a color mapping to cover the number of available categories, but the breakdown chart had specific logic for using larger default color sets to account for many different block categories on the pie chart. This would be useful to have in general for all the charts, so refactor this logic into its own utility, and use it across all the visualization plots. Signed-off-by: Alex Jones <alex.jones@lowrisc.org>
A very small fix - the "All categories" category was being assigned a colour even though its colour is never being used, since all jobs/tests instead have their colours derived from the defined categorization function. To keep colour mapping consistent across the various plots, add a special case to handle this. Signed-off-by: Alex Jones <alex.jones@lowrisc.org>
26fe9e0 to
a9ea125
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.
This PR is the sixteenth of a series of PRs to introduce instrumentation reporting to DVSim.
This PR does a little bit of clean up on the instrumentation reports to make the handling of colours in the plots more consistent. First, we turn the colour mapping functionality implemented for the breakdown visualizations into a general utility that is used by all the report types, as this is useful for the edge cases where we have a lot more categories/traces than Plotly's default colours (of which there are 10). Since e.g. the charts breaking down jobs/tests by block will probably need more than that, we inevitably see repeating colours - using a larger default colour set can avoid this. The second commit is a minor fix to said "longest N jobs/tests" chart(s) to make the colour mapping consistent with the other generated plots.