dor-services 5.14.1 → 5.14.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1226fc3ef972a86c8f937c9661961090eb0d88ef
4
- data.tar.gz: e565da5cf3cd17f91a47ea0ee81bbb6a51bd369a
3
+ metadata.gz: be30d76033b050011082caadf9ec5a3da75e412f
4
+ data.tar.gz: 6778987396c62b992630663176f239f68bec053a
5
5
  SHA512:
6
- metadata.gz: 07a3e81424cb58dd2c92a90f239d6ad88ccf3b49096031ff4ffa7d0b88ceccecc1839aed6366880c6293f14840cd245e248d37566854ce2e0abf4e21bf079119
7
- data.tar.gz: 6b6578cc48f6d05e20e8b48a74e67fc08a37cb64dd15b11f48aa8e3a36b2ad520e702443d896a821c2abb2f9ca90dd4a4adcbf3e3902dcc63e2d73088c933e2c
6
+ metadata.gz: 7f641683e2dbcbe2fda8bb56a8102907795445b0be294ef5340671154b46db9954c342aad32b559e0e32631516ef9d9325c025d3393482a34056505f340dc9b7
7
+ data.tar.gz: 052a81775ef955913deca327821321e6abbb215894e6420fcc0e05440e12775c454d48eefffe171abdd3839148dedb71fe6f67591af72e6096723927cd971b62
@@ -1,3 +1,5 @@
1
+ require 'benchmark'
2
+
1
3
  module Dor
2
4
  class IndexingService
3
5
  ##
@@ -55,9 +57,21 @@ module Dor
55
57
  should_raise_errors = options.fetch(:raise_errors, true)
56
58
  end
57
59
 
58
- obj = Dor.load_instance pid
59
- solr_doc = reindex_object obj, options
60
- index_logger.info "updated index for #{pid}"
60
+ obj = nil
61
+ solr_doc = nil
62
+
63
+ # benchmark how long it takes to load the object
64
+ load_stats = Benchmark.measure('load_instance') do
65
+ obj = Dor.load_instance pid
66
+ end.format('%n realtime %rs total CPU %ts').gsub(/[\(\)]/, '')
67
+
68
+ # benchmark how long it takes to convert the object to a Solr document
69
+ to_solr_stats = Benchmark.measure('to_solr') do
70
+ solr_doc = reindex_object obj, options
71
+ end.format('%n realtime %rs total CPU %ts').gsub(/[\(\)]/, '')
72
+
73
+ index_logger.info "successfully updated index for #{pid} (metrics: #{load_stats}; #{to_solr_stats})"
74
+
61
75
  solr_doc
62
76
  rescue StandardError => se
63
77
  if se.is_a? ActiveFedora::ObjectNotFoundError
@@ -1,3 +1,3 @@
1
1
  module Dor
2
- VERSION = '5.14.1'.freeze
2
+ VERSION = '5.14.2'.freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dor-services
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.14.1
4
+ version: 5.14.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Klein
@@ -682,8 +682,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
682
682
  version: 1.3.6
683
683
  requirements: []
684
684
  rubyforge_project:
685
- rubygems_version: 2.5.1
685
+ rubygems_version: 2.6.7
686
686
  signing_key:
687
687
  specification_version: 4
688
688
  summary: Ruby implmentation of DOR services used by the SULAIR Digital Library
689
689
  test_files: []
690
+ has_rdoc: