| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <!-- | 2 <!-- |
| 3 Copyright (c) 2015 The Chromium Authors. All rights reserved. | 3 Copyright (c) 2015 The Chromium Authors. All rights reserved. |
| 4 Use of this source code is governed by a BSD-style license that can be | 4 Use of this source code is governed by a BSD-style license that can be |
| 5 found in the LICENSE file. | 5 found in the LICENSE file. |
| 6 --> | 6 --> |
| 7 | 7 |
| 8 <link rel="import" href="/tracing/base/range.html"> | 8 <link rel="import" href="/tracing/base/range.html"> |
| 9 <link rel="import" href="/tracing/base/task.html"> | 9 <link rel="import" href="/tracing/base/task.html"> |
| 10 <link rel="import" href="/tracing/model/event_set.html"> | 10 <link rel="import" href="/tracing/model/event_set.html"> |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 91 }, | 91 }, |
| 92 | 92 |
| 93 hasRelatedEvents: function() { | 93 hasRelatedEvents: function() { |
| 94 return (this.eventGroups_ && this.eventGroups_.length > 0); | 94 return (this.eventGroups_ && this.eventGroups_.length > 0); |
| 95 }, | 95 }, |
| 96 | 96 |
| 97 setRelatedEvents: function(eventSet) { | 97 setRelatedEvents: function(eventSet) { |
| 98 this.cancelAllTasks_(); | 98 this.cancelAllTasks_(); |
| 99 this.eventGroups_ = []; | 99 this.eventGroups_ = []; |
| 100 this.addRuntimeCallStats_(eventSet); | 100 this.addRuntimeCallStats_(eventSet); |
| 101 this.addV8GCObjectStats_(eventSet); |
| 101 this.addV8Slices_(eventSet); | 102 this.addV8Slices_(eventSet); |
| 102 this.addConnectedFlows_(eventSet); | 103 this.addConnectedFlows_(eventSet); |
| 103 this.addConnectedEvents_(eventSet); | 104 this.addConnectedEvents_(eventSet); |
| 104 this.addOverlappingSamples_(eventSet); | 105 this.addOverlappingSamples_(eventSet); |
| 105 this.updateContents_(); | 106 this.updateContents_(); |
| 106 }, | 107 }, |
| 107 | 108 |
| 108 addConnectedFlows_: function(eventSet) { | 109 addConnectedFlows_: function(eventSet) { |
| 109 var classifier = new tr.ui.analysis.FlowClassifier(); | 110 var classifier = new tr.ui.analysis.FlowClassifier(); |
| 110 eventSet.forEach(function(slice) { | 111 eventSet.forEach(function(slice) { |
| (...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 289 if (slices.length > 0) { | 290 if (slices.length > 0) { |
| 290 this.eventGroups_.push({ | 291 this.eventGroups_.push({ |
| 291 type: 'Runtime call stats table', | 292 type: 'Runtime call stats table', |
| 292 // eslint-disable-next-line | 293 // eslint-disable-next-line |
| 293 tooltip: 'All V8 slices containing runtime call stats table in the selec
ted slice(s).', | 294 tooltip: 'All V8 slices containing runtime call stats table in the selec
ted slice(s).', |
| 294 selection: slices | 295 selection: slices |
| 295 }); | 296 }); |
| 296 } | 297 } |
| 297 }, | 298 }, |
| 298 | 299 |
| 300 addV8GCObjectStats_: function(eventSet) { |
| 301 var slices = new tr.model.EventSet; |
| 302 for (var slice of eventSet) { |
| 303 if (slice.title === 'V8.GC_Objects_Stats') |
| 304 slices.push(slice); |
| 305 } |
| 306 if (slices.length > 0) { |
| 307 this.eventGroups_.push({ |
| 308 type: 'V8 GC stats table', |
| 309 tooltip: 'All V8 GC statistics slices in the selected set.', |
| 310 selection: slices |
| 311 }); |
| 312 } |
| 313 }, |
| 314 |
| 299 updateContents_: function() { | 315 updateContents_: function() { |
| 300 var table = this.$.table; | 316 var table = this.$.table; |
| 301 if (this.eventGroups_ === undefined) | 317 if (this.eventGroups_ === undefined) |
| 302 table.tableRows = []; | 318 table.tableRows = []; |
| 303 else | 319 else |
| 304 table.tableRows = this.eventGroups_.slice(); | 320 table.tableRows = this.eventGroups_.slice(); |
| 305 table.rebuild(); | 321 table.rebuild(); |
| 306 } | 322 } |
| 307 }); | 323 }); |
| 308 </script> | 324 </script> |
| OLD | NEW |