mirror of
https://github.com/dankamongmen/notcurses.git
synced 2024-10-31 15:20:13 +00:00
summarize_stats: don't divide by 0 writeouts
This commit is contained in:
parent
32500239ac
commit
9d516d8c8c
@ -94,7 +94,7 @@ void summarize_stats(notcurses* nc){
|
||||
qprefix(stats->raster_ns, NANOSECS_IN_SEC, totalbuf, 0);
|
||||
qprefix(stats->raster_min_ns, NANOSECS_IN_SEC, minbuf, 0);
|
||||
qprefix(stats->raster_max_ns, NANOSECS_IN_SEC, maxbuf, 0);
|
||||
qprefix(stats->raster_ns / stats->writeouts, NANOSECS_IN_SEC, avgbuf, 0);
|
||||
qprefix(stats->writeouts ? stats->raster_ns / stats->writeouts : 0, NANOSECS_IN_SEC, avgbuf, 0);
|
||||
fprintf(stderr, "%ju raster%s, %ss (%ss min, %ss avg, %ss max)\n",
|
||||
stats->writeouts, stats->writeouts == 1 ? "" : "s",
|
||||
totalbuf, minbuf, avgbuf, maxbuf);
|
||||
|
Loading…
Reference in New Issue
Block a user