OLD | NEW |
1 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2017, 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 // VMOptions=--error_on_bad_type --error_on_bad_override | 4 // VMOptions=--error_on_bad_type --error_on_bad_override |
5 | 5 |
6 import 'package:observatory/cpu_profile.dart'; | 6 import 'dart:developer'; |
7 import 'package:observatory/models.dart' as M; | 7 import 'package:observatory/models.dart' as M; |
8 import 'package:observatory/service_io.dart'; | 8 import 'package:observatory/service_io.dart'; |
| 9 import 'package:observatory/cpu_profile.dart'; |
9 import 'package:unittest/unittest.dart'; | 10 import 'package:unittest/unittest.dart'; |
10 | 11 import 'service_test_common.dart'; |
11 import 'test_helper.dart'; | 12 import 'test_helper.dart'; |
12 | 13 |
13 void verifyHelper(var root, bool exclusive) { | 14 void verifyHelper(var root, bool exclusive) { |
14 if (root.children.length == 0) { | 15 if (root.children.length == 0) { |
15 return; | 16 return; |
16 } | 17 } |
17 | 18 |
18 /* if (!(root is FunctionCallTreeNode)) { | 19 /* if (!(root is FunctionCallTreeNode)) { |
19 print('${root.profileCode.code.name}'); | 20 print('${root.profileCode.code.name}'); |
20 } else { | 21 } else { |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 var codeTreeExclusive = | 76 var codeTreeExclusive = |
76 cpuProfile.loadCodeTree(M.ProfileTreeDirection.exclusive); | 77 cpuProfile.loadCodeTree(M.ProfileTreeDirection.exclusive); |
77 var functionTreeExclusive = | 78 var functionTreeExclusive = |
78 cpuProfile.loadFunctionTree(M.ProfileTreeDirection.exclusive); | 79 cpuProfile.loadFunctionTree(M.ProfileTreeDirection.exclusive); |
79 verify(codeTreeExclusive, true); | 80 verify(codeTreeExclusive, true); |
80 verify(functionTreeExclusive, true); | 81 verify(functionTreeExclusive, true); |
81 } | 82 } |
82 ]; | 83 ]; |
83 | 84 |
84 main(args) async => runVMTests(args, tests); | 85 main(args) async => runVMTests(args, tests); |
OLD | NEW |