From 2fe74969abcc81db695c8d06ead6211f49471dd0 Mon Sep 17 00:00:00 2001 From: Richard Hallett Date: Tue, 23 Apr 2019 13:04:39 +0200 Subject: [PATCH] Add logging for elasticsearch request time. This is to help diagnose where potential performance issues are. --- app/controllers/dois_controller.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/controllers/dois_controller.rb b/app/controllers/dois_controller.rb index 9f8ccbf49..9040a7f07 100644 --- a/app/controllers/dois_controller.rb +++ b/app/controllers/dois_controller.rb @@ -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 = []