View | Details | Raw Unified | Return to bug 29672
Collapse All | Expand All

(-)a/test-plugins-call.pl (-1 / +24 lines)
Line 0 Link Here
0
- 
1
#!/usr/bin/perl
2
3
use strict;
4
use warnings;
5
use v5.10;
6
7
use Koha::Plugins;
8
use Time::HiRes qw(gettimeofday tv_interval);
9
10
sub run_x_times {
11
    my ($x) = @_;
12
13
    my $start = [gettimeofday];
14
    for (1..$x) {
15
        my @metadata = Koha::Plugins->call('get_metadata');
16
    }
17
    my $elapsed = tv_interval($start);
18
    say "$x call(s): Elapsed $elapsed seconds";
19
}
20
21
run_x_times 1;
22
run_x_times 10;
23
run_x_times 100;
24
run_x_times 1000;

Return to bug 29672