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

Unified Diff: telemetry/telemetry/benchmark.py

Issue 2977283002: Ownership into GenericSets (Closed)
Patch Set: Fix tests after reabse Created 3 years, 5 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 | « docs/how-to-write-metrics.md ('k') | telemetry/telemetry/benchmark_unittest.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: telemetry/telemetry/benchmark.py
diff --git a/telemetry/telemetry/benchmark.py b/telemetry/telemetry/benchmark.py
index 73e93e0f81939db917ba2581473d7e12a6bb6b36..717e774046a6961df424fbe8caa8656fe1963734 100644
--- a/telemetry/telemetry/benchmark.py
+++ b/telemetry/telemetry/benchmark.py
@@ -221,14 +221,26 @@ class Benchmark(command_line.Command):
return BenchmarkMetadata(self.Name(), self.__doc__,
self.GetTraceRerunCommands())
- def GetOwnership(self):
- """Returns an Ownership Diagnostic containing the benchmark's information.
+ def GetBugComponents(self):
+ """Returns a GenericSet Diagnostic containing the benchmark's Monorail
+ component.
Returns:
- Diagnostic with the benchmark's owners' e-mails and component name
+ GenericSet Diagnostic with the benchmark's bug component name
"""
- return histogram.Ownership(
- decorators.GetEmails(self), decorators.GetComponent(self))
+ benchmark_component = decorators.GetComponent(self)
+ component_diagnostic_value = (
+ [benchmark_component] if benchmark_component else [])
+ return histogram.GenericSet(component_diagnostic_value)
+
+ def GetOwners(self):
+ """Returns a Generic Diagnostic containing the benchmark's owners' emails
+ in a list.
+
+ Returns:
+ Diagnostic with a list of the benchmark's owners' emails
+ """
+ return histogram.GenericSet(decorators.GetEmails(self) or [])
@decorators.Deprecated(
2017, 7, 29, 'Use CreateCoreTimelineBasedMeasurementOptions instead.')
« no previous file with comments | « docs/how-to-write-metrics.md ('k') | telemetry/telemetry/benchmark_unittest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698