Skip to content

[Feature] Interactive HTML Report for Trace Analysis #35

@KaykCaputo

Description

@KaykCaputo

[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

  • I searched existing issues before opening this request
  • I described the problem and why this feature is useful
  • I provided enough detail for implementation discussion

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is needed

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions