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

Unified Diff: telemetry/telemetry/benchmark.py

Issue 2977283002: Ownership into GenericSets (Closed)
Patch Set: Fix reserved info reference 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
Index: telemetry/telemetry/benchmark.py
diff --git a/telemetry/telemetry/benchmark.py b/telemetry/telemetry/benchmark.py
index 78b516ce0deab9e4acfe2e81d0fd8d036ba924e2..20185a9cf58739ee9ffbca6b462073508660594d 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 GetComponent(self):
+ """Returns a Generic Diagnostic containing the benchmark's ownership
+ component.
Returns:
- Diagnostic with the benchmark's owners' e-mails and component name
+ Diagnostic with the benchmark's owners' 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.')

Powered by Google App Engine
This is Rietveld 408576698