Skip to content
This repository has been archived by the owner on Nov 11, 2019. It is now read-only.

Add Datadog timers for Active Data requests #1620

Merged
merged 6 commits into from
Oct 16, 2018
Merged

Conversation

La0
Copy link
Contributor

@La0 La0 commented Oct 16, 2018

Fixes #1471

else:
logger.info('No datadog credentials')

# Must be instanciated after initialize
Copy link
Collaborator

Choose a reason for hiding this comment

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

Nit: instantiated

@@ -95,7 +109,7 @@ def base_query(filters=[], excludes=[]):
]
)

async with ActiveDataClient() as es:
async with ActiveDataClient('list_tests') as es:
Copy link
Collaborator

Choose a reason for hiding this comment

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

Nit: maybe there's a way to automatically use the function name here, so we don't have to manually specify the name?

if self.start_time is not None:
query_time = time.time() - self.start_time
stats.histogram('codecoverage.active_data.{}'.format(self.name), query_time)
logger.info('ActiveData ES query {} took {}'.format(self.name, query_time))
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is there a way to get the actualy query time (that is, the ES query time, without the network time).

@@ -21,6 +23,7 @@
'''


@stats.timed('codecoverage.active_data.coverage_paths')
Copy link
Collaborator

Choose a reason for hiding this comment

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

This should be redundant now that there's a timer in search.

@@ -61,12 +64,13 @@ def search(self, name, body, timeout=10):
def enabled(self):
return self.client is not None

@stats.timed('codecoverage.active_data.get_latest_changeset')
Copy link
Collaborator

Choose a reason for hiding this comment

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

This should be redundant now that there's a timer in search.

@marco-c marco-c merged commit f435ad0 into mozilla:master Oct 16, 2018
@La0 La0 deleted the ccov-timers branch October 18, 2018 07:36
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants