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

Unified Diff: perf_insights/perf_insights/mappers/trace_import_cost.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_import_cost.html
diff --git a/perf_insights/perf_insights/mappers/trace_import_cost.html b/perf_insights/perf_insights/mappers/trace_import_cost.html
index 3652e17bf0822618a0b2d97f4d1ae2a596092270..9e31d7e59b0b8648dec35cd751b50be26bfad311 100644
--- a/perf_insights/perf_insights/mappers/trace_import_cost.html
+++ b/perf_insights/perf_insights/mappers/trace_import_cost.html
@@ -32,13 +32,13 @@ tr.exportTo('pi.m', function() {
function getTraceImportCostReport(result, model) {
var top_level_slices = [];
- model.iterateAllEvents(function(event) {
+ for (var event of model.descendantEvents()) {
if (event instanceof MeasureAsyncSlice &&
event.viewSubGroupTitle === 'TraceImport' &&
event.isTopLevel) {
top_level_slices.push(event);
}
- });
+ }
var traceImportCostInfos = [];
for (var i = 0; i < top_level_slices.length; ++i) {
fetchSlicesInfo(top_level_slices[i], traceImportCostInfos);

Powered by Google App Engine
This is Rietveld 408576698