brendangregg / FlameGraph

Stack trace visualizer
http://www.brendangregg.com/flamegraphs.html
17.46k stars 1.97k forks source link

minwidth now accepts a percentage of time with % #316

Closed matthew-olson-intel closed 1 year ago

matthew-olson-intel commented 1 year ago

Refactoring minwidth to additionally accept a percentage of total time instead of a pixel value. The disadvantage here is that GetOptions has to accept minwidth as a string, and we have to do the string->float conversion ourselves; in this case, I chose to use a regex to find digits and periods, and print the usage string if it couldn't be persuaded to be a float.

matthew-olson-intel commented 1 year ago

Should fix #315.

brendangregg commented 1 year ago

thanks!