Prevent division by zero in core/cputop.py
authorAntoine Busque <abusque@efficios.com>
Wed, 28 Oct 2015 06:10:24 +0000 (02:10 -0400)
committerAntoine Busque <abusque@efficios.com>
Wed, 28 Oct 2015 06:10:24 +0000 (02:10 -0400)
commit88e6acc6d76603bbbda5643bebbc81cc21fa6549
tree51013847c550da3959b5ee6eadca17fa665b3195
parent83ad157bf7c49ffb8ed0fd53fe8738ac8f757602
Prevent division by zero in core/cputop.py

When an extremely short period is generated (usually at the end of a
trace), there is a chance that the duration will be zero. Instead of
trying to divide by this value, set the usage percent for that
(degenerate) period to 0.

Signed-off-by: Antoine Busque <abusque@efficios.com>
lttnganalyses/core/cputop.py
This page took 0.025141 seconds and 5 git commands to generate.