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

Unified Diff: trace_processor/experimental/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 nits, rebase 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: trace_processor/experimental/mappers/trace_stats.html
diff --git a/trace_processor/experimental/mappers/trace_stats.html b/trace_processor/experimental/mappers/trace_stats.html
index b1e3ea840b145d7bc1174c175f493df851b64a49..cb1c18ddf92761a8e97e0f9e6315774a354232b6 100644
--- a/trace_processor/experimental/mappers/trace_stats.html
+++ b/trace_processor/experimental/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.getDescendantEvents()) {
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();
« no previous file with comments | « trace_processor/experimental/mappers/trace_import_cost.html ('k') | trace_processor/experimental/mappers/v8_map_function.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698