Instrumentation report encodes exported images as base64 instead of saving them separately
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 13
- Forks
- 21
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 8
Description
Also see the discussion at https://github.com/lowRISC/dvsim/pull/201#discussion_r3275114794
In the case that we have very large datasets, two instrumentation report graphs (the gantt timeline and the parallelism chart, which use the same underlying implementation) will be created using matplotlib and rasterized to a PNG. This is for both space reasons (to stop generating HTML for graphs that grows to potentially dozens or hundreds of MiB), and for performance reasons (turns out that graphs that get that large do not perform very well in the browser anyway).
The current `InstrumentationVisualizer` interface assumes that you're just returning a string HTML fragment and not generating any other files. This needs to be reworked so that we can save the PNG directly and refer to it with a simple relative link in the HTML report, to help save on file size and follow best practices. The existing `ReportArtifacts` type somewhat already covers this use case, but is used primarily for the simulation report flows which already use multiple HTML files.
This could also be taken a step further - each HTML report fragment could be its own seperate page which is loaded & served via HTMX. Some re-architecting of the instrumentation report flow will likely be required to facilitate this however.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the InstrumentationVisualizer interface, the ReportArtifacts type, and the discussion in pull request #201. Trace how the gantt timeline and parallelism chart are generated and how the HTML report is assembled; done means PNG artifacts are saved separately and referenced by relative links instead of embedded base64 data.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- data-visualization, tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100