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

Unified Diff: perf_insights/perf_insights/mappers/trace_stats.html

Issue 2083213002: Change call-sites in trace viewer to use generators instead of iteration functions. (Closed) Base URL: git@github.com:catapult-project/catapult@master
Patch Set: fix break/continue Created 4 years, 6 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: perf_insights/perf_insights/mappers/trace_stats.html
diff --git a/perf_insights/perf_insights/mappers/trace_stats.html b/perf_insights/perf_insights/mappers/trace_stats.html
index 7da64b6178f229feaff3fa06279c3859c149fc53..9eb638f8b5d07ad6e8e6b76616d9172cbe9cecde 100644
--- a/perf_insights/perf_insights/mappers/trace_stats.html
+++ b/perf_insights/perf_insights/mappers/trace_stats.html
@@ -26,7 +26,7 @@ tr.exportTo('pi.m', function() {
var categories = {};
var seconds_counts = {};
- model.iterateAllEvents(function(event) {
+ for (var event of model.descendantEvents()) {
eventCount += 1;
if (event.start < firstTime)
firstTime = event.start;
@@ -45,7 +45,7 @@ tr.exportTo('pi.m', function() {
seconds_counts[second] = 0;
seconds_counts[second]++;
- });
+ }
var histogram = COUNT_NUMERIC_BUILDER.build();

Powered by Google App Engine
This is Rietveld 408576698