Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gather some simple metrics on query and fetch time #144

Merged
merged 3 commits into from
Feb 18, 2016
Merged

gather some simple metrics on query and fetch time #144

merged 3 commits into from
Feb 18, 2016

Conversation

anho
Copy link
Contributor

@anho anho commented Feb 8, 2016

As I'd like to have some more insight into Elasticsearch during operations I added two metrics.

es_search_index = options[:es_search_index]
path_prefix = options[:path_prefix]
path_prefix[0] = '' if path_prefix[0]=='/'
path_prefix[path_prefix.length-1] = '' if path_prefix[path_prefix.length-1]=='/'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is essentially duplicate code - perhaps pull out into a method and call it in all the *_url methods?

@anho
Copy link
Contributor Author

anho commented Feb 11, 2016

@jamtur01 any chance we can get this done soon?

@jamtur01
Copy link
Member

I'll try to look at it later tonight.

def response_is_bad(response)
return true if response.nil?

is_bad = response.status != 200
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The logic here could be simplified.

if response.status != 200
   . . .

@anho
Copy link
Contributor Author

anho commented Feb 15, 2016

@jamtur01 any additional comments on how to make it better?

@jamtur01
Copy link
Member

I'll try another look later today.

@jamtur01
Copy link
Member

Thanks!

jamtur01 added a commit that referenced this pull request Feb 18, 2016
gather some simple metrics on query and fetch time
@jamtur01 jamtur01 merged commit 4ab6cf0 into riemann:master Feb 18, 2016
@anho
Copy link
Contributor Author

anho commented Feb 18, 2016

Thanks as well. Are you able to tag another version in the next days?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants