Skip to content

HTML output invisible for profiles with long CLI invocations #448

Description

@alexmanning9904

When generating an HTML profile for a very long CLI invocation (I first ran into this when profiling a pytest call that selected ~500 individual tests), HTML output does not show any profile data.

I created a simple hello world script to demonstrate this;

import sys

name = sys.argv[1]

print(f"Hello, {name}")

and executed it twice.

The first time I ran pyinstrument -o output_big.html ./hello.py "Alex" and got output_small.html, which looks reasonable:

Image

The second time, I ran pyinstrument -o output_big.html ./hello.py [the contents of the entire Bee Movie script here] and got output_big.html, which doesn't show any call stack or timeline:

Image

I think that the right solution here would be to truncate the displayed CLI call in the HTML renderer if it is too long.

I'm running pyinstrument 5.1.2, on Python 3.9.21. I've observed the rendering problem on both Chrome and Edge.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions