Created
January 3, 2018 16:14
-
-
Save gnucifer/fa3bb31d49f1258a4d1af270d235d76f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
use C4::Context; | |
use C4::Biblio; | |
use C4::Items; | |
use t::lib::Mocks; | |
use Time::HiRes qw(gettimeofday tv_interval); | |
t::lib::Mocks::mock_preference('item-level_itypes', '1'); | |
my $itemnumbers = C4::Context->dbh->selectcol_arrayref(qq{SELECT itemnumber FROM items WHERE biblionumber = 2}); | |
my $i = 20000; | |
my $t0 = [gettimeofday]; | |
while($i--) { | |
#foreach my $itemnumber (@{$itemnumbers}) { | |
# GetItem($itemnumber); | |
#} | |
C4::Items::GetItems($itemnumbers); | |
} | |
my $elapsed = tv_interval ( $t0, [gettimeofday]); | |
print "${elapsed}s\n"; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment