From ab0f7bbed65e8196da03c8bd4057123f0bed622f Mon Sep 17 00:00:00 2001 From: Julian Maurice Date: Thu, 9 Dec 2021 15:21:48 +0100 Subject: [PATCH] Bug 29672: [DO NOT PUSH] Test script Run test-plugins-call.pl without arguments with and without the patches, with some plugins enabled. Make sure to run misc/devel/install_plugins.pl before --- test-plugins-call.pl | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100755 test-plugins-call.pl diff --git a/test-plugins-call.pl b/test-plugins-call.pl new file mode 100755 index 0000000000..2897260ec1 --- /dev/null +++ b/test-plugins-call.pl @@ -0,0 +1,24 @@ +#!/usr/bin/perl + +use strict; +use warnings; +use v5.10; + +use Koha::Plugins; +use Time::HiRes qw(gettimeofday tv_interval); + +sub run_x_times { + my ($x) = @_; + + my $start = [gettimeofday]; + for (1..$x) { + my @metadata = Koha::Plugins->call('get_metadata'); + } + my $elapsed = tv_interval($start); + say "$x call(s): Elapsed $elapsed seconds"; +} + +run_x_times 1; +run_x_times 10; +run_x_times 100; +run_x_times 1000; -- 2.30.2