Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(210)

Unified Diff: appengine/cr-buildbucket/api.py

Issue 1903653002: buildbucket: fix instrumentation (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@master
Patch Set: disable gae_ts_mon in api_test.py Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | appengine/cr-buildbucket/test/api_test.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: appengine/cr-buildbucket/api.py
diff --git a/appengine/cr-buildbucket/api.py b/appengine/cr-buildbucket/api.py
index 0dca1a3f6c4e91219c001d29686a7c42a98fccc0..0275dc5c4a6b26af0f2ff909a89c373650d12394 100644
--- a/appengine/cr-buildbucket/api.py
+++ b/appengine/cr-buildbucket/api.py
@@ -172,12 +172,12 @@ def buildbucket_api_method(
request_message_class, response_message_class, **kwargs)
def decorator(fn):
- def ts_mon_time():
- return utils.datetime_to_timestamp(utils.utcnow()) / 1000000.0
- fn = gae_ts_mon.instrument_endpoint(time_fn=ts_mon_time)(fn)
fn = catch_errors(fn, response_message_class)
fn = endpoints_decorator(fn)
fn = ndb.toplevel(fn)
+ def ts_mon_time():
+ return utils.datetime_to_timestamp(utils.utcnow()) / 1000000.0
+ fn = gae_ts_mon.instrument_endpoint(time_fn=ts_mon_time)(fn)
return fn
return decorator
« no previous file with comments | « no previous file | appengine/cr-buildbucket/test/api_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698