Add instrumentation report (re-)generation to the dvsim-admin CLI#211
Merged
AlexJones0 merged 4 commits intoMay 21, 2026
Merged
Conversation
These aren't particularly necessary, are currently causing issues with the click CLI autocomplete times due to the modules being loaded each time, and will potentially long-term cause circular import issues. Let's just use the full paths for imports instead here. Signed-off-by: Alex Jones <alex.jones@lowrisc.org>
65bc427 to
c806aa6
Compare
This keeps this as a nice light-weight import that can be used by the click CLI, also helping to keep potentially user-facing data boundaries isolated. Signed-off-by: Alex Jones <alex.jones@lowrisc.org>
There was an existing ruff D401 error here because ruff wants the docstring to be in an imperative mood, but the click CLI uses the docstring to determine the actual documentation provided in the `dvsim-admin --help` menu - so we don't want ruff dictating the text here. Tell ruff to ignore this with an appropriate noqa. Signed-off-by: Alex Jones <alex.jones@lowrisc.org>
This will allow instrumentation reports to be re-generated from previously saved `metrics.json` files after runs are completed. Importantly, it also provides an interface for specifying a custom rendering profile. This allows us to reduce the level of detail in regular DVSim runs, to minimize the size and increase the performance of the generated instrumentation reports - whilst retaining the ability to browse fully-detailed reports using `dvsim-admin report instrumentation` with e.g. `--profile=high` or `--profile=full` as needed. Signed-off-by: Alex Jones <alex.jones@lowrisc.org>
c806aa6 to
5006012
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 eighteenth of a series of PRs to introduce instrumentation reporting to DVSim.
This PR integrates the HTML instrumentation report generation with the
dvsim-adminCLI to allow reports to be re-generated from previously savedmetrics.jsonfiles after DVSim runs have already completed.Importantly, it also provides an interface for specifying a custom rendering profile. This means that we can render with the "Normal" profile by default for regular DVSim runs, minimizing the size and increasing the performance of the generated instrumentation reports - whilst at the same time retaining the ability to browse fully-detailed reports via the
dvsim-adminCLI.For example, you might run:
And then later run e.g.
to generate a new
metrics.jsonwith fully-detailed graphs (without any regard for report size or performance).