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