Skip to content

Instantly share code, notes, and snippets.

@gnucifer
Created December 28, 2017 12:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gnucifer/a86feeac08dac9bc1bb699f52b95f8b2 to your computer and use it in GitHub Desktop.
Save gnucifer/a86feeac08dac9bc1bb699f52b95f8b2 to your computer and use it in GitHub Desktop.
#!/usr/bin/perl
use C4::Context;
use C4::Biblio;
use t::lib::Mocks;
my $biblionumber = <biblionumber_with_items_goes_here>;
# Warm up caches to get a more fair benchmark
GetMarcBiblio({biblionumber => $biblionumber, embed_items => 1});
DB::enable_profile();
t::lib::Mocks::mock_preference('item-level_itypes', '1');
my $i = 200;
while($i--) {
GetMarcBiblio({biblionumber => $biblionumber, embed_items => 1});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment