Skip to content

Commit

Permalink
Add logging for elasticsearch request time.
Browse files Browse the repository at this point in the history
This is to help diagnose where potential performance issues are.
  • Loading branch information
richardhallett committed Apr 23, 2019
1 parent 838c84c commit 2fe7496
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/controllers/dois_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@ def index
end

begin
logger.info "[Benchmark] Elasticsearch request " + response.took.to_s + " ms"

# If we're using sample groups we need to unpack the results from the aggregation bucket hits.
if sample_group_field.present?
sample_dois = []
Expand Down

0 comments on commit 2fe7496

Please sign in to comment.