Class: Blacklight::RuntimeRegistry

Inherits:
Object
  • Object
show all
Defined in:
lib/blacklight/runtime_registry.rb

Defined Under Namespace

Classes: Stats

Class Method Summary collapse

Class Method Details

.call(_name, start, finish, _id, _payload) ⇒ Object

See Also:

  • ActiveSupport::Notifications.monotonic_subscribe


25
26
27
28
# File 'lib/blacklight/runtime_registry.rb', line 25

def call(_name, start, finish, _id, _payload)
  stats.solr_runtime += (finish - start) * 1000.0
  stats.solr_query_count += 1
end

.statsObject



20
21
22
# File 'lib/blacklight/runtime_registry.rb', line 20

def stats
  ActiveSupport::IsolatedExecutionState[:blacklight_solr_runtime] ||= Stats.new
end