Sha256: e0f59e65a6508c7d356ca44b0847063bc1fc1233f4e6770f579ee6f96095f3f4

Contents?: true

Size: 1.13 KB

Versions: 7

Compression:

Stored size: 1.13 KB

Contents

require File.dirname(__FILE__) + '/../test_helper'
class AlephRecordBenchMarks < Test::Unit::TestCase    
  nyu_only_tests(self.name) do
    
    def setup
      @primo_config = YAML.load_file("#{Rails.root}/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
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
umlaut-3.0.0beta2 ./test/unit/aleph_record_benchmarks.rb
umlaut-3.0.0beta1 ./test/unit/aleph_record_benchmarks.rb
umlaut-3.0.0alpha15 ./test/unit/aleph_record_benchmarks.rb
umlaut-3.0.0alpha14 ./test/unit/aleph_record_benchmarks.rb
umlaut-3.0.0alpha13 ./test/unit/aleph_record_benchmarks.rb
umlaut-3.0.0alpha12 ./test/unit/aleph_record_benchmarks.rb
umlaut-3.0.0alpha11 ./test/unit/aleph_record_benchmarks.rb