[Feature] Interactive HTML Report for Trace Analysis
Summary
Introduce an --html flag to generate a standalone, interactive HTML report for visualizing trace results and performance data.
Problem
Currently, users analyze traces via CLI or CSV. While efficient for automation, it's difficult to visualize deep call stacks or identify "hot paths" quickly in large trace files using just text.
Proposed Solution
Develop a reporter that exports trace data into a single HTML file.
- Use a lightweight template (e.g., Jinja2 or a simple string template).
- Include an interactive table (searchable/sortable) or a basic Flame Graph using a library like
d3.js or speedscope format.
- Command:
oracletrace app.py --html report.html.
Use Case
A developer wants to share performance results with their team or visually inspect which function in a complex nested execution is consuming the most time without parsing raw JSON/CSV.
Example
oracletrace my_script.py --html performance_report.html
[OracleTrace] Trace complete. Interactive report generated: performance_report.html
Alternatives Considered
- Integration with external tools like Chrome DevTools (exporting to
.cpuprofile).
- Relying solely on the existing CSV export.
Additional Context
This would be a great addition to the v2.1.0 roadmap to improve the "Developer Experience" (DX) following the PyCoder's Weekly feature.
Checklist
[Feature] Interactive HTML Report for Trace Analysis
Summary
Introduce an
--htmlflag to generate a standalone, interactive HTML report for visualizing trace results and performance data.Problem
Currently, users analyze traces via CLI or CSV. While efficient for automation, it's difficult to visualize deep call stacks or identify "hot paths" quickly in large trace files using just text.
Proposed Solution
Develop a reporter that exports trace data into a single HTML file.
d3.jsorspeedscopeformat.oracletrace app.py --html report.html.Use Case
A developer wants to share performance results with their team or visually inspect which function in a complex nested execution is consuming the most time without parsing raw JSON/CSV.
Example
Alternatives Considered
.cpuprofile).Additional Context
This would be a great addition to the v2.1.0 roadmap to improve the "Developer Experience" (DX) following the PyCoder's Weekly feature.
Checklist