Sha256: 984071ed9512ad28b3f123fd0c396f71a99c545500823ac88fbab88672546e76
Contents?: true
Size: 1.05 KB
Versions: 9
Compression:
Stored size: 1.05 KB
Contents
require File.dirname(__FILE__) + '/../test_helper' class AlephRecordBenchMarks < ActiveSupport::TestCase def setup @primo_config = YAML.load_file("#{Rails.root}/config/umlaut_config/primo.yml") @nyu_aleph_config = @primo_config["sources"]["nyu_aleph"] @rest_url = @nyu_aleph_config["rest_url"] @aleph_doc_library = "NYU01" @aleph_doc_number = "000062856" @bogus_url = "http://library.nyu.edu/bogus" @TESTS = 10 end # Get benchmarks for calls to the Aleph API. def test_benchmarks # Display performance benchmarks. time = Benchmark.bmbm do |results| results.report("Aleph items:") { @TESTS.times { aleph_record = Exlibris::Aleph::Record.new(@aleph_doc_library, @aleph_doc_number, @rest_url) items = aleph_record.items } } results.report("Aleph bib and holdings:") { @TESTS.times { aleph_record = Exlibris::Aleph::Record.new(@aleph_doc_library, @aleph_doc_number, @rest_url) items = aleph_record.bib items = aleph_record.holdings } } end end end
Version data entries
9 entries across 9 versions & 1 rubygems