From 8b22613dd5a85396155aaabef64902ed9e469ad0 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Sat, 3 Jan 2015 20:41:54 -0600 Subject: Add lower bounds for bad compression report Packages smaller than 25 KiB shouldn't really come into play here; this was meant to show huge packages spending too much time on compression. Signed-off-by: Dan McGee --- devel/reports.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/devel/reports.py b/devel/reports.py index ca1a3321..66fbd627 100644 --- a/devel/reports.py +++ b/devel/reports.py @@ -48,7 +48,8 @@ def big(packages, username): def badcompression(packages, username): cutoff = 0.90 * F('installed_size') - packages = packages.filter(compressed_size__gt=0, installed_size__gt=0, + packages = packages.filter(compressed_size__gt=25*1024, + installed_size__gt=25*1024, compressed_size__gte=cutoff).order_by('-compressed_size') # Format the compressed and installed sizes with MB/GB/etc suffixes @@ -153,11 +154,10 @@ def signature_time(packages, username): ['compressed_size_pretty', 'installed_size_pretty']) REPORT_BADCOMPRESS = DeveloperReport('badcompression', 'Bad Compression', - 'Packages with a compression ratio of less than 10%', badcompression, + 'Packages > 25 KiB with a compression ratio < 10%', badcompression, ['Compressed Size', 'Installed Size', 'Ratio', 'Type'], ['compressed_size_pretty', 'installed_size_pretty','ratio', 'compress_type']) - REPORT_MAN = DeveloperReport('uncompressed-man', 'Uncompressed Manpages', 'Packages with uncompressed manpages', uncompressed_man) -- cgit v1.2.3-54-g00ecf