| 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 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 126 } | 126 } |
| 127 | 127 |
| 128 void render() { | 128 void render() { |
| 129 var content = [ | 129 var content = [ |
| 130 new NavBarElement(queue: _r.queue) | 130 new NavBarElement(queue: _r.queue) |
| 131 ..children = [ | 131 ..children = [ |
| 132 new NavTopMenuElement(queue: _r.queue), | 132 new NavTopMenuElement(queue: _r.queue), |
| 133 new NavVMMenuElement(_vm, _events, queue: _r.queue), | 133 new NavVMMenuElement(_vm, _events, queue: _r.queue), |
| 134 new NavIsolateMenuElement(_isolate, _events, queue: _r.queue), | 134 new NavIsolateMenuElement(_isolate, _events, queue: _r.queue), |
| 135 new NavMenuElement('cpu profile (table)', | 135 new NavMenuElement('cpu profile (table)', |
| 136 link: Uris.profiler(_isolate), last: true, queue: _r.queue), | 136 link: Uris.cpuProfilerTable(_isolate), last: true, queue: _r.queue
), |
| 137 new NavRefreshElement(queue: _r.queue) | 137 new NavRefreshElement(queue: _r.queue) |
| 138 ..onRefresh.listen(_refresh), | 138 ..onRefresh.listen(_refresh), |
| 139 new NavRefreshElement(label: 'Clear', queue: _r.queue) | 139 new NavRefreshElement(label: 'Clear', queue: _r.queue) |
| 140 ..onRefresh.listen(_clearCpuProfile), | 140 ..onRefresh.listen(_clearCpuProfile), |
| 141 new NavNotifyElement(_notifications, queue: _r.queue) | 141 new NavNotifyElement(_notifications, queue: _r.queue) |
| 142 ], | 142 ], |
| 143 ]; | 143 ]; |
| 144 if (_progress == null) { | 144 if (_progress == null) { |
| 145 children = content; | 145 children = content; |
| 146 return; | 146 return; |
| (...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 442 | 442 |
| 443 static double _getExclusiveT(M.ProfileFunction f) => | 443 static double _getExclusiveT(M.ProfileFunction f) => |
| 444 f.normalizedExclusiveTicks; | 444 f.normalizedExclusiveTicks; |
| 445 static double _getInclusiveT(M.ProfileFunction f) => | 445 static double _getInclusiveT(M.ProfileFunction f) => |
| 446 f.normalizedInclusiveTicks; | 446 f.normalizedInclusiveTicks; |
| 447 double _getCalleeT(M.ProfileFunction f) => | 447 double _getCalleeT(M.ProfileFunction f) => |
| 448 _selected.callees[f] / _selected.callees.values.reduce((a, b) => a + b); | 448 _selected.callees[f] / _selected.callees.values.reduce((a, b) => a + b); |
| 449 double _getCallerT(M.ProfileFunction f) => | 449 double _getCallerT(M.ProfileFunction f) => |
| 450 _selected.callers[f] / _selected.callers.values.reduce((a, b) => a + b); | 450 _selected.callers[f] / _selected.callers.values.reduce((a, b) => a + b); |
| 451 } | 451 } |
| OLD | NEW |