xrmx / bootchart

merge of bootchart-collector and pybootchartgui
GNU General Public License v2.0
233 stars 87 forks source link

What could be the problem here... (ZeroDivisionError: float division by zero) #96

Open Arunvist opened 2 years ago

Arunvist commented 2 years ago

Can you please help us, what could be the problem in generated bootchart data? attached data as well...

k@IND81LW7Q2-W:/tmp/android-bootchart$ pybootchartgui bootchart.tar parsing 'bootchart.tar' parsing 'header' parsing 'proc_stat.log' parsing 'proc_ps.log' parsing 'proc_diskstats.log' merged 0 logger processes pruned 146 process, 0 exploders, 1 threads, and 1 runs False Traceback (most recent call last): File "/usr/bin/pybootchartgui", line 23, in sys.exit(main()) File "/usr/lib/python2.7/dist-packages/pybootchartgui/main.py", line 137, in main render() File "/usr/lib/python2.7/dist-packages/pybootchartgui/main.py", line 128, in render batch.render(writer, res, options, filename) File "/usr/lib/python2.7/dist-packages/pybootchartgui/batch.py", line 41, in render draw.render(ctx, options, *res) File "/usr/lib/python2.7/dist-packages/pybootchartgui/draw.py", line 282, in render draw_chart(ctx, IO_COLOR, True, chart_rect, [(sample.time, sample.util) for sample in disk_stats], proc_tree) File "/usr/lib/python2.7/dist-packages/pybootchartgui/draw.py", line 201, in draw_chart yscale = float(chart_bounds[3]) / max(y for (x,y) in data) ZeroDivisionError: float division by zero

bootchart.zip

antoine-girard-vallee commented 2 years ago

This might be a bit late, and I'm just a user of this application, but I think the issue lies in the pruning algorithm. I can make your bootchart.tar work just fine with the following:

python3 ./pybootchartgui.py --show-all -n -f svg bootchart.tar

I could most probably fix this, but I think the owner of this repo disappeared.