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

Unified Diff: tracing/tracing/model/model.html

Issue 2046553003: Add RelatedEventSet Diagnostic (Closed) Base URL: https://github.com/catapult-project/catapult.git@master
Patch Set: comments, 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
« no previous file with comments | « tracing/trace_viewer.gypi ('k') | tracing/tracing/model/model_test.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tracing/tracing/model/model.html
diff --git a/tracing/tracing/model/model.html b/tracing/tracing/model/model.html
index dbc4e2cc62a51149b5e1e67da1063688849ee0e0..b47840a5d9e0e72f25f3845c4e19b8b305a8ebb7 100644
--- a/tracing/tracing/model/model.html
+++ b/tracing/tracing/model/model.html
@@ -110,11 +110,22 @@ tr.exportTo('tr', function() {
this.doesHelperGUIDSupportThisModel_ = {};
this.helpersByConstructorGUID_ = {};
+ this.eventsByStableId_ = undefined;
}
Model.prototype = {
__proto__: tr.model.EventContainer.prototype,
+ getEventByStableId: function(stableId) {
+ if (this.eventsByStableId_ === undefined) {
+ this.eventsByStableId_ = {};
+ this.iterateAllEvents(function(event) {
+ this.eventsByStableId_[event.stableId] = event;
+ }, this);
+ }
+ return this.eventsByStableId_[stableId];
+ },
+
getOrCreateHelper: function(constructor) {
if (!constructor.guid)
throw new Error('Helper constructors must have GUIDs');
« no previous file with comments | « tracing/trace_viewer.gypi ('k') | tracing/tracing/model/model_test.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698