Skip to content

Commit

Permalink
Benchmark indexing performance
Browse files Browse the repository at this point in the history
  • Loading branch information
bess committed Apr 10, 2024
1 parent 8771842 commit 680eb5f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ gem 'alma', github: 'tulibraries/alma_rb', branch: 'main'
gem 'aws-sdk-s3'
gem 'aws-sdk-sqs'
gem 'bcrypt_pbkdf'
gem 'benchmark'
gem 'bixby', '~> 5.0'
gem 'bootstrap-sass', '~> 3.4.1'
gem 'capistrano-passenger'
Expand Down
1 change: 1 addition & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -646,6 +646,7 @@ DEPENDENCIES
axe-core-api
axe-core-rspec
bcrypt_pbkdf
benchmark
bixby (~> 5.0)
bootstrap-sass (~> 3.4.1)
capistrano-passenger
Expand Down
7 changes: 6 additions & 1 deletion lib/tasks/orangeindex.rake
Original file line number Diff line number Diff line change
Expand Up @@ -108,14 +108,19 @@ namespace :liberate do
IndexManager.for(solr_url).index_remaining!
end

require 'benchmark'
desc "Index single incremental dump uses ENV['DUMP_ID'] (default 1177)"
task index_single_dump: :environment do
solr_url = "http://lib-solr8d-staging.princeton.edu:8983/solr/catalog-performance"
dump_id_str = ENV['DUMP_ID'] || '1177'
dump_id = dump_id_str.to_i
next_dump = Dump.find(dump_id)
dump_file = next_dump.dump_files.first
Alma::Indexer::DumpFileIndexer.new(dump_file, solr_url:).index!
puts "!!!!!"
puts "Indexing dump file #{dump_file.id} from dump #{dump_id}"
puts Benchmark.measure {
Alma::Indexer::DumpFileIndexer.new(dump_file, solr_url:).index!
}
end

desc "Index a single MARC XML file against SET_URL"
Expand Down

0 comments on commit 680eb5f

Please sign in to comment.