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

Unified Diff: perf_insights/perf_insights/mappers/v8_map_function.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/v8_map_function.html
diff --git a/perf_insights/perf_insights/mappers/v8_map_function.html b/perf_insights/perf_insights/mappers/v8_map_function.html
index 308378a73beaa4573fea08eda21d82a2a5bd0d89..e0db3689d9f177099c3a2a9acf99213e2bbad81c 100644
--- a/perf_insights/perf_insights/mappers/v8_map_function.html
+++ b/perf_insights/perf_insights/mappers/v8_map_function.html
@@ -34,12 +34,12 @@ tr.exportTo('pi.m', function() {
var sliceCosts = [];
- model.iterateAllEvents(function(event) {
+ for (var event of model.descendantEvents()) {
if (!(event instanceof tr.model.ThreadSlice))
- return;
+ continue;
if (!event.title.startsWith('V8.') && !event.title.startsWith('V8Test.'))
- return;
+ continue;
function _get_parent_data(event) {
var curSlice = event;
@@ -221,7 +221,7 @@ tr.exportTo('pi.m', function() {
value: sliceData
};
sliceCosts.push(newElement);
- });
+ }
result.addPair('wr', sliceCosts);
}
@@ -237,11 +237,11 @@ tr.exportTo('pi.m', function() {
}, this);
}, this);
- model.iterateAllEvents(function storeEventToUnassociatedSet(event) {
+ for (var event of model.descendantEvents()) {
if (stageTitleByGUID[event.guid] !== undefined)
return;
stageTitleByGUID[event.guid] = 'Unknown';
- });
+ }
return stageTitleByGUID;
}

Powered by Google App Engine
This is Rietveld 408576698