From 66f71a40ddeae7ebacc9a3a89b031d2759679283 Mon Sep 17 00:00:00 2001 From: Konrad Date: Mon, 2 Dec 2024 14:36:36 +0100 Subject: [PATCH] feat: add output size to benchmark script I have noticed that vips output tends to be bigger despite using the same quality settings. I believe this is caused by vips preserving more details when performing operations, but decided to expose that difference in benchmark script to allow making more informed decisions --- bin/benchmark-full | 1 + 1 file changed, 1 insertion(+) diff --git a/bin/benchmark-full b/bin/benchmark-full index b82b07c..24e69c4 100755 --- a/bin/benchmark-full +++ b/bin/benchmark-full @@ -75,6 +75,7 @@ module Morandi stdout_str, _status = Open3.capture2e(*cmd) result = parse_single_benchmark_result(stdout_str) result.each { |key, value| stats[key] << value } + stats[:output_size_mb] << (File.size(output_image_path).to_f / 1024 / 1024).round(2) end stats.each do |key, entries|