--- a/plugins/mod_http_file_share.lua Tue Jun 08 00:58:27 2021 +0200
+++ b/plugins/mod_http_file_share.lua Tue Jun 08 13:33:40 2021 +0200
@@ -71,7 +71,13 @@
measure_quota_cache_size(quota_cache:count());
end);
-local measure_uploads = module:measure("upload", "sizes");
+local buckets = {};
+for n = 10, 40, 2 do
+ local exp = math.floor(2 ^ n);
+ table.insert(buckets, exp);
+ if exp >= file_size_limit then break end
+end
+local measure_uploads = module:measure("upload", "sizes", {buckets = buckets});
-- Convenience wrapper for logging file sizes
local function B(bytes) return hi.format(bytes, "B", "b"); end