pyinstrument icon indicating copy to clipboard operation
pyinstrument copied to clipboard

Add **kwargs to Profiler.print for renderers.ConsoleRenderer ?

Open paugier opened this issue 10 months ago • 0 comments

Thank you for pyinstrument, which is really nice, useful and easy to use!

In order to print percentages, I had to change a profiler.print() to

print(
    profiler.output(
        renderer=ConsoleRenderer(
            unicode=True,
            color=True,
            show_all=False,
            time="percent_of_total",
         )
    )
)

With these changes, I think it would have been enough to write profiler.print(time="percent_of_total").

This PR is to explain the situation and discuss what would be a good solution.

paugier avatar Apr 17 '24 13:04 paugier