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

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

Issue 2920603003: Fix some observatory analysis issues. (Closed)
Patch Set: rebase obs analysis issues PR against master Created 3 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 unified diff | Download patch
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<NodeT extends M.CallTreeNode> 7 abstract class CallTreeNode<NodeT extends M.CallTreeNode>
8 implements M.CallTreeNode { 8 implements M.CallTreeNode {
9 final List<NodeT> children; 9 final List<NodeT> children;
10 final int count; 10 final int count;
(...skipping 827 matching lines...) Expand 10 before | Expand all | Expand 10 after
838 return sleep(); 838 return sleep();
839 }; 839 };
840 try { 840 try {
841 clear(); 841 clear();
842 progress.add(0.0); 842 progress.add(0.0);
843 if (profile == null) { 843 if (profile == null) {
844 return; 844 return;
845 } 845 }
846 846
847 if ((owner != null) && (owner is Isolate)) { 847 if ((owner != null) && (owner is Isolate)) {
848 isolate = owner as Isolate; 848 isolate = owner;
849 isolate.resetCachedProfileData(); 849 isolate.resetCachedProfileData();
850 } 850 }
851 851
852 sampleCount = profile['sampleCount']; 852 sampleCount = profile['sampleCount'];
853 samplePeriod = profile['samplePeriod']; 853 samplePeriod = profile['samplePeriod'];
854 sampleRate = (Duration.MICROSECONDS_PER_SECOND / samplePeriod); 854 sampleRate = (Duration.MICROSECONDS_PER_SECOND / samplePeriod);
855 stackDepth = profile['stackDepth']; 855 stackDepth = profile['stackDepth'];
856 timeSpan = profile['timeSpan']; 856 timeSpan = profile['timeSpan'];
857 857
858 num length = profile['codes'].length + profile['functions'].length; 858 num length = profile['codes'].length + profile['functions'].length;
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
1073 } 1073 }
1074 1074
1075 int approximateMillisecondsForCount(count) { 1075 int approximateMillisecondsForCount(count) {
1076 return (count * samplePeriod) ~/ Duration.MICROSECONDS_PER_MILLISECOND; 1076 return (count * samplePeriod) ~/ Duration.MICROSECONDS_PER_MILLISECOND;
1077 } 1077 }
1078 1078
1079 double approximateSecondsForCount(count) { 1079 double approximateSecondsForCount(count) {
1080 return (count * samplePeriod) / Duration.MICROSECONDS_PER_SECOND; 1080 return (count * samplePeriod) / Duration.MICROSECONDS_PER_SECOND;
1081 } 1081 }
1082 } 1082 }
OLDNEW
« no previous file with comments | « runtime/observatory/lib/object_graph.dart ('k') | runtime/observatory/lib/src/elements/debugger.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698