| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 } |
| OLD | NEW |