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

Side by Side Diff: runtime/observatory/lib/src/cpu_profile/cpu_profile.dart

Issue 1846713003: Add call tree filter to Observatory CPU profile tree (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 8 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 unified diff | Download patch
« no previous file with comments | « no previous file | runtime/observatory/lib/src/elements/cpu_profile.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, 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 part of cpu_profiler; 5 part of cpu_profiler;
6 6
7 abstract class CallTreeNode { 7 abstract class CallTreeNode {
8 final List<CallTreeNode> children; 8 final List<CallTreeNode> children;
9 final int count; 9 final int count;
10 double get percentage => _percentage; 10 double get percentage => _percentage;
(...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after
293 } 293 }
294 294
295 class _FilteredCodeCallTreeBuilder extends _FilteredCallTreeBuilder { 295 class _FilteredCodeCallTreeBuilder extends _FilteredCallTreeBuilder {
296 _FilteredCodeCallTreeBuilder(CallTreeNodeFilter filter, 296 _FilteredCodeCallTreeBuilder(CallTreeNodeFilter filter,
297 CodeCallTree tree) 297 CodeCallTree tree)
298 : super(filter, tree, 298 : super(filter, tree,
299 new CodeCallTree(tree.inclusive, 299 new CodeCallTree(tree.inclusive,
300 new CodeCallTreeNode(tree.root.profileData, 300 new CodeCallTreeNode(tree.root.profileData,
301 tree.root.count))); 301 tree.root.count)));
302 302
303 _copyNode(FunctionCallTreeNode node) { 303 _copyNode(CodeCallTreeNode node) {
304 return new FunctionCallTreeNode(node.profileData, node.count); 304 return new CodeCallTreeNode(node.profileData, node.count);
305 } 305 }
306 } 306 }
307 307
308 class FunctionCallTree extends CallTree { 308 class FunctionCallTree extends CallTree {
309 FunctionCallTree(bool inclusive, FunctionCallTreeNode root) 309 FunctionCallTree(bool inclusive, FunctionCallTreeNode root)
310 : super(inclusive, root) { 310 : super(inclusive, root) {
311 _setFunctionPercentage(null, root); 311 _setFunctionPercentage(null, root);
312 } 312 }
313 313
314 FunctionCallTree filtered(CallTreeNodeFilter filter) { 314 FunctionCallTree filtered(CallTreeNodeFilter filter) {
(...skipping 605 matching lines...) Expand 10 before | Expand all | Expand 10 after
920 int approximateMillisecondsForCount(count) { 920 int approximateMillisecondsForCount(count) {
921 var MICROSECONDS_PER_MILLISECOND = 1000.0; 921 var MICROSECONDS_PER_MILLISECOND = 1000.0;
922 return (count * samplePeriod) ~/ MICROSECONDS_PER_MILLISECOND; 922 return (count * samplePeriod) ~/ MICROSECONDS_PER_MILLISECOND;
923 } 923 }
924 924
925 double approximateSecondsForCount(count) { 925 double approximateSecondsForCount(count) {
926 var MICROSECONDS_PER_SECOND = 1000000.0; 926 var MICROSECONDS_PER_SECOND = 1000000.0;
927 return (count * samplePeriod) / MICROSECONDS_PER_SECOND; 927 return (count * samplePeriod) / MICROSECONDS_PER_SECOND;
928 } 928 }
929 } 929 }
OLDNEW
« no previous file with comments | « no previous file | runtime/observatory/lib/src/elements/cpu_profile.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698