Skip to content

Make colour handling more consistent in the HTML instrumentation report#209

Merged
AlexJones0 merged 2 commits into
lowRISC:masterfrom
AlexJones0:instrumentation_report_colours
May 21, 2026
Merged

Make colour handling more consistent in the HTML instrumentation report#209
AlexJones0 merged 2 commits into
lowRISC:masterfrom
AlexJones0:instrumentation_report_colours

Conversation

@AlexJones0
Copy link
Copy Markdown
Contributor

@AlexJones0 AlexJones0 commented May 20, 2026

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.

@AlexJones0 AlexJones0 requested a review from machshev May 20, 2026 22:55
Copy link
Copy Markdown
Collaborator

@machshev machshev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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>
@AlexJones0 AlexJones0 force-pushed the instrumentation_report_colours branch from 26fe9e0 to a9ea125 Compare May 21, 2026 11:34
@AlexJones0 AlexJones0 marked this pull request as ready for review May 21, 2026 11:34
@AlexJones0 AlexJones0 added this pull request to the merge queue May 21, 2026
Merged via the queue into lowRISC:master with commit e153aeb May 21, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants