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

Unified Diff: infra_libs/event_mon/config.py

Issue 1427903002: send_monitoring_event: support for default event and gomastats (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@event-mon-no-default-kind
Patch Set: Rebased Created 5 years, 1 month 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 | « infra_libs/event_mon/__init__.py ('k') | infra_libs/event_mon/test/config_test.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: infra_libs/event_mon/config.py
diff --git a/infra_libs/event_mon/config.py b/infra_libs/event_mon/config.py
index ccdd6a445bfe6d3c7690d47a922e5ed9f0fd13fd..8dc7d9f004a7f9849582a6d9b85eed0cb1371a49 100644
--- a/infra_libs/event_mon/config.py
+++ b/infra_libs/event_mon/config.py
@@ -165,6 +165,15 @@ def setup_monitoring(run_type='dry',
dry_run=dry_run)
+def get_default_event():
+ """Returns a copy of the default event."""
+
+ # We return a copy here to tell people not to modify the event directly.
+ ret = ChromeInfraEvent()
+ ret.CopyFrom(_cache['default_event'])
+ return ret
+
+
def set_default_event(event):
"""Change the default ChromeInfraEvent used to compute all events.
« no previous file with comments | « infra_libs/event_mon/__init__.py ('k') | infra_libs/event_mon/test/config_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698