summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2015-01-03 20:41:54 -0600
committerDan McGee <dan@archlinux.org>2015-01-03 20:41:54 -0600
commit8b22613dd5a85396155aaabef64902ed9e469ad0 (patch)
tree2eeb0b4daf5526e0a46c21fc2f19e09dfc55da80
parent0bd67a57a9f735775682474ae1abb4932b948670 (diff)
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 <dan@archlinux.org>
-rw-r--r--devel/reports.py6
1 files 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 @@ REPORT_BIG = DeveloperReport('big', 'Big',
['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)