OLD | NEW |
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 library cpu_profile_table_element; | 5 library cpu_profile_table_element; |
6 | 6 |
7 import 'dart:async'; | 7 import 'dart:async'; |
8 import 'dart:html'; | 8 import 'dart:html'; |
9 import 'package:observatory/models.dart' as M; | 9 import 'package:observatory/models.dart' as M; |
10 import 'package:observatory/src/elements/containers/virtual_collection.dart'; | 10 import 'package:observatory/src/elements/containers/virtual_collection.dart'; |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
120 new NavRefreshElement(queue: _r.queue)..onRefresh.listen(_refresh), | 120 new NavRefreshElement(queue: _r.queue)..onRefresh.listen(_refresh), |
121 new NavRefreshElement(label: 'Clear', queue: _r.queue) | 121 new NavRefreshElement(label: 'Clear', queue: _r.queue) |
122 ..onRefresh.listen(_clearCpuProfile), | 122 ..onRefresh.listen(_clearCpuProfile), |
123 new NavNotifyElement(_notifications, queue: _r.queue) | 123 new NavNotifyElement(_notifications, queue: _r.queue) |
124 ]), | 124 ]), |
125 ]; | 125 ]; |
126 if (_progress == null) { | 126 if (_progress == null) { |
127 children = content; | 127 children = content; |
128 return; | 128 return; |
129 } | 129 } |
130 content.add(new SampleBufferControlElement(_progress, _progressStream, | 130 content.add(new SampleBufferControlElement(_vm, _progress, _progressStream, |
131 showTag: false, queue: _r.queue)); | 131 showTag: false, queue: _r.queue)); |
132 if (_progress.status == M.SampleProfileLoadingStatus.loaded) { | 132 if (_progress.status == M.SampleProfileLoadingStatus.loaded) { |
133 content.add(new BRElement()); | 133 content.add(new BRElement()); |
134 content.addAll(_createTables()); | 134 content.addAll(_createTables()); |
135 content.add(new BRElement()); | 135 content.add(new BRElement()); |
136 content.addAll(_createTree()); | 136 content.addAll(_createTree()); |
137 } | 137 } |
138 children = content; | 138 children = content; |
139 } | 139 } |
140 | 140 |
(...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
433 | 433 |
434 static double _getExclusiveT(M.ProfileFunction f) => | 434 static double _getExclusiveT(M.ProfileFunction f) => |
435 f.normalizedExclusiveTicks; | 435 f.normalizedExclusiveTicks; |
436 static double _getInclusiveT(M.ProfileFunction f) => | 436 static double _getInclusiveT(M.ProfileFunction f) => |
437 f.normalizedInclusiveTicks; | 437 f.normalizedInclusiveTicks; |
438 double _getCalleeT(M.ProfileFunction f) => | 438 double _getCalleeT(M.ProfileFunction f) => |
439 _selected.callees[f] / _selected.callees.values.reduce((a, b) => a + b); | 439 _selected.callees[f] / _selected.callees.values.reduce((a, b) => a + b); |
440 double _getCallerT(M.ProfileFunction f) => | 440 double _getCallerT(M.ProfileFunction f) => |
441 _selected.callers[f] / _selected.callers.values.reduce((a, b) => a + b); | 441 _selected.callers[f] / _selected.callers.values.reduce((a, b) => a + b); |
442 } | 442 } |
OLD | NEW |