projects
/
deliverable
/
lttng-analyses.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a205a2b
)
Fix: prevent division by zero in cputop
author
Antoine Busque
<abusque@efficios.com>
Sun, 25 Oct 2015 05:08:01 +0000
(
01:08
-0400)
committer
Antoine Busque
<abusque@efficios.com>
Sun, 25 Oct 2015 05:08:01 +0000
(
01:08
-0400)
Signed-off-by: Antoine Busque <abusque@efficios.com>
lttnganalyses/cli/cputop.py
patch
|
blob
|
blame
|
history
diff --git
a/lttnganalyses/cli/cputop.py
b/lttnganalyses/cli/cputop.py
index 28d62b00fb859330ac31f8f8cbb5732dce372367..a2ca9b6610f664fa95ee0d4a3aee2ecb0349fef9 100644
(file)
--- a/
lttnganalyses/cli/cputop.py
+++ b/
lttnganalyses/cli/cputop.py
@@
-127,6
+127,9
@@
class Cputop(Command):
cpu_count = len(self.state.cpus)
usage_percent = 0
+ if not cpu_count:
+ return
+
for cpu in sorted(self._analysis.cpus.values(),
key=operator.attrgetter('usage_percent'),
reverse=True):
This page took
0.026974 seconds
and
5
git commands to generate.