]> git.sesse.net Git - skvidarsync/commitdiff
Add a benchmark mode.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Fri, 10 Nov 2023 21:45:41 +0000 (22:45 +0100)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Fri, 10 Nov 2023 21:45:41 +0000 (22:45 +0100)
bin/sync.pl

index 49fea375c2c548bf7f95310fd880f7e21749f6c9..7e0317eb9550f8e431102fc54b5b4ce08bf6b71d 100644 (file)
@@ -831,6 +831,12 @@ if ($#ARGV >= 0 && $ARGV[0] eq '--daemon') {
                        }
                }
        }
+} elsif ($#ARGV >= 0 && $ARGV[0] eq '--benchmark') {
+       for my $i (0..9) {
+               $dbh->{AutoCommit} = 1;
+               run($dbh);
+               $dbh->commit;
+       }
 } else {
        run($dbh);
 }