Sha256: e3410cb556bfc25200076ebd70a50d573044a44413c604305fc53100b1dc2d41

Contents?: true

Size: 908 Bytes

Versions: 19

Compression:

Stored size: 908 Bytes

Contents

require 'test_helper'
class RecordBenchmarks < ActiveSupport::TestCase
  def setup
    @rest_url = "http://aleph.library.nyu.edu:1891/rest-dlf"
    @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.
  test "benchmarks" do
    # 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

19 entries across 19 versions & 1 rubygems

Version Path
exlibris-aleph-1.1.0 test/record_benchmarks.rb
exlibris-aleph-1.0.8 test/record_benchmarks.rb
exlibris-aleph-1.0.7 test/record_benchmarks.rb
exlibris-aleph-1.0.6 test/record_benchmarks.rb
exlibris-aleph-1.0.5 test/record_benchmarks.rb
exlibris-aleph-1.0.4 test/record_benchmarks.rb
exlibris-aleph-1.0.3 test/record_benchmarks.rb
exlibris-aleph-1.0.2 test/record_benchmarks.rb
exlibris-aleph-1.0.1 test/record_benchmarks.rb
exlibris-aleph-1.0.0 test/record_benchmarks.rb
exlibris-aleph-0.1.6 test/unit/record_benchmarks.rb
exlibris-aleph-0.1.5 test/unit/record_benchmarks.rb
exlibris-aleph-0.1.4 test/unit/record_benchmarks.rb
exlibris-aleph-0.1.3 test/unit/record_benchmarks.rb
exlibris-aleph-0.1.2 test/unit/record_benchmarks.rb
exlibris-aleph-0.1.1 test/unit/record_benchmarks.rb
exlibris-aleph-0.1.0 test/unit/record_benchmarks.rb
exlibris-aleph-0.0.2 test/unit/record_benchmarks.rb
exlibris-aleph-0.0.1 test/unit/record_benchmarks.rb