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:
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:
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.
When generating an HTML profile for a very long CLI invocation (I first ran into this when profiling a
pytestcall that selected ~500 individual tests), HTML output does not show any profile data.I created a simple hello world script to demonstrate this;
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: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: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.