# Subscribes to performance instruments throughout the app & logs their results

[
  "SolrRequest.get_data_for_articles", "SolrRequest.get_data_for_viz",
  "SolrRequest.validate_dois"
].each do |name|
  ActiveSupport::Notifications.subscribe(name) do |*args|
    event = ActiveSupport::Notifications::Event.new(*args)
    Rails.logger.debug(
      "#{event.name}: #{event.payload.size} articles took #{event.duration}ms."
    )
  end
end

# Subscribes to performance instruments throughout the app & logs their results

[
  "SolrRequest.get_data_for_articles", "SolrRequest.validate_dois"
].each do |name|
  ActiveSupport::Notifications.subscribe(name) do |*args|
    event = ActiveSupport::Notifications::Event.new(*args)
    Rails.logger.debug(
      "#{event.name}: #{event.payload.size} articles took #{event.duration}ms."
    )
  end
end

Remove subscription to SolrRequest.get_data_for_viz, as it doesn't exist anymore
Remove subscription to SolrRequest.get_data_for_viz, as it doesn't exist anymore
