From bb02dd04540ef8c922840e054a3a671abb4b8530 Mon Sep 17 00:00:00 2001 From: Sandro Santilli Date: Thu, 14 May 2015 17:12:59 +0200 Subject: [PATCH] Allow passing 0 to --iterate for skipping queries --- tools/benchmark.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/benchmark.pl b/tools/benchmark.pl index 4e67709..8b2ad43 100755 --- a/tools/benchmark.pl +++ b/tools/benchmark.pl @@ -25,6 +25,7 @@ Options: The `:c' string will be replaced with the column name. A default set of queries are run if none are provided. --iterate Number of times to run each query, defaults to 1. + Use 0 to skip running queries (still prints dataset info). EOF return $s; } @@ -285,8 +286,7 @@ EOF #$info = query("select pg_size_pretty(pg_total_relation_size('${tn}'));\n"); #print ' Total relation size: ' . $info . "\n"; - #next; # TODO: allow early exit here, before running speed tests - + next if ! $iterations; # Speed tests here