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