diff options
author | Karel Klic <kklic@redhat.com> | 2010-01-25 11:58:42 +0100 |
---|---|---|
committer | Karel Klic <kklic@redhat.com> | 2010-01-25 11:58:42 +0100 |
commit | 0fd863dfdb13a5e6381ac90fec685995edf000ce (patch) | |
tree | c750cbdb7213b15cbb316570fe1986bea9f48854 /scripts | |
parent | faf1402f7b416088b8ad878a6f5f07f4c56692a9 (diff) | |
download | abrt-0fd863dfdb13a5e6381ac90fec685995edf000ce.tar.gz abrt-0fd863dfdb13a5e6381ac90fec685995edf000ce.tar.xz abrt-0fd863dfdb13a5e6381ac90fec685995edf000ce.zip |
Better stats output
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/abrt-bz-stats | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/scripts/abrt-bz-stats b/scripts/abrt-bz-stats index fd222dc9..e58a87f8 100755 --- a/scripts/abrt-bz-stats +++ b/scripts/abrt-bz-stats @@ -46,14 +46,15 @@ print "{0} bugs found.".format(total) # Load cache from previous run. Speeds up the case Bugzilla closes connection. # buginfos_loaded = {} -if os.path.isfile("cache"): - f = open("cache", 'r') +CACHE_FILE = "abrt-bz-stats-cache.tmp" +if os.path.isfile(CACHE_FILE): + f = open(CACHE_FILE, 'r') buginfos_loaded = pickle.load(f) f.close() def save_to_cache(): global buginfos_loaded - f = open("cache", 'w') + f = open(CACHE_FILE, 'w') pickle.dump(buginfos_loaded, f, 2) f.close() @@ -179,12 +180,14 @@ for month in months: m = stats[month] print "MONTH ", month print " -", m.bugs_reported(), "bugs reported" - if m.closed_as_useful > 0: - print " -", m.closed_as_useful, "bugs (" + str(m.closed_as_useful_percentage()) + "%) closed (ABRT was useful)" - if m.closed_as_waste > 0: - print " -", m.closed_as_waste, "bugs (" + str(m.closed_as_waste_percentage())+ "%) closed (ABRT was not useful)" - if m.closed_as_other > 0: - print " -", m.closed_as_other, "bugs (" + str(m.closed_as_other_percentage()) + "%) closed other way" + if m.closed() > 0: + print " -", m.closed(), "bugs closed" + if m.closed_as_useful > 0: + print " -", m.closed_as_useful, "bugs (" + str(m.closed_as_useful_percentage()) + "%) as fixed, so ABRT was useful" + if m.closed_as_waste > 0: + print " -", m.closed_as_waste, "bugs (" + str(m.closed_as_waste_percentage())+ "%) as duplicate, can't fix, insuf. data, so ABRT was not useful" + if m.closed_as_other > 0: + print " -", m.closed_as_other, "bugs (" + str(m.closed_as_other_percentage()) + "%) as notabug, wontfix, worksforme" if len(m.top_crashers()) > 0: print " - top crashers:" for (component, num_crashes) in m.top_crashers(): |