summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorKarel Klic <kklic@redhat.com>2010-01-22 11:20:00 +0100
committerKarel Klic <kklic@redhat.com>2010-01-22 11:20:00 +0100
commita7f78af31ad0dfae4a5144fc626d24d0897a910d (patch)
tree377e7958333ada09294c9ab1c032a93693b5d0f0 /scripts
parent8dae5a38504ed09295e5ab0426afa66e194fe55e (diff)
downloadabrt-a7f78af31ad0dfae4a5144fc626d24d0897a910d.tar.gz
abrt-a7f78af31ad0dfae4a5144fc626d24d0897a910d.tar.xz
abrt-a7f78af31ad0dfae4a5144fc626d24d0897a910d.zip
Added parameter N (count) to top_crashers
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/abrt-bz-stats6
1 files changed, 3 insertions, 3 deletions
diff --git a/scripts/abrt-bz-stats b/scripts/abrt-bz-stats
index fd222dc9..78686bb3 100755
--- a/scripts/abrt-bz-stats
+++ b/scripts/abrt-bz-stats
@@ -110,14 +110,14 @@ class Month:
result += component
return result
- def top_crashers(self):
+ def top_crashers(self, n = 10):
"""
- Top five components causing crash this month.
+ Top n components causing crash this month.
Returns list of tuples (component, number of crashes)
"""
result = sorted(self.components.items(), key=lambda x: x[1])
result.reverse()
- return result[0:5]
+ return result[0:n]
def closed_as_useful_percentage(self):
return int(100 * self.closed_as_useful / self.closed())