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

Unified Diff: tools/telemetry/telemetry/page/profile_generator.py

Issue 907503002: telemetry: Create a helper class to quickly extend profiles. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Modify profile_generator to allow more types of classes in the profile_generator/ directory. Created 5 years, 10 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: tools/telemetry/telemetry/page/profile_generator.py
diff --git a/tools/telemetry/telemetry/page/profile_generator.py b/tools/telemetry/telemetry/page/profile_generator.py
index 4d7bf7d75d2cf385c747a59309e3c57ec7eb71ea..21e20c8c09ca169c337d3791c07ff08c55c5cc39 100644
--- a/tools/telemetry/telemetry/page/profile_generator.py
+++ b/tools/telemetry/telemetry/page/profile_generator.py
@@ -33,9 +33,9 @@ def _DiscoverProfileCreatorClasses():
# Remove '_creator' suffix from keys.
profile_creators = {}
for test_name, test_class in profile_creators_unfiltered.iteritems():
- assert test_name.endswith('_creator')
- test_name = test_name[:-len('_creator')]
- profile_creators[test_name] = test_class
+ if test_name.endswith('_creator'):
nednguyen 2015/02/12 02:10:54 Why this file change? I thought we both agree that
erikchen 2015/02/12 02:26:07 Without this change, small_profile_creator won't w
nednguyen 2015/02/12 03:17:59 Does that mean it's currently broken? But why does
erikchen 2015/02/12 03:38:35 The previous code goes through the profile_creator
nednguyen 2015/02/12 16:45:52 I still don't understand. Line 30 shows that profi
erikchen 2015/02/12 18:16:46 The implementation is not buggy. This change is no
+ test_name = test_name[:-len('_creator')]
+ profile_creators[test_name] = test_class
return profile_creators

Powered by Google App Engine
This is Rietveld 408576698