OLD | NEW |
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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 service; | 5 part of service; |
6 | 6 |
7 // Some value smaller than the object ring, so requesting a large array | 7 // Some value smaller than the object ring, so requesting a large array |
8 // doesn't result in an expired ref because the elements lapped it in the | 8 // doesn't result in an expired ref because the elements lapped it in the |
9 // object ring. | 9 // object ring. |
10 const int kDefaultFieldLimit = 100; | 10 const int kDefaultFieldLimit = 100; |
(...skipping 4386 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4397 description = map['description']; | 4397 description = map['description']; |
4398 vmName = map['name']; | 4398 vmName = map['name']; |
4399 value = map['value']; | 4399 value = map['value']; |
4400 min = map['min']; | 4400 min = map['min']; |
4401 max = map['max']; | 4401 max = map['max']; |
4402 } | 4402 } |
4403 | 4403 |
4404 String toString() => "ServiceMetric($_id)"; | 4404 String toString() => "ServiceMetric($_id)"; |
4405 } | 4405 } |
4406 | 4406 |
4407 void printFrames(List<Frame> frames) async { | 4407 Future<Null> printFrames(List<Frame> frames) async { |
4408 for (int i = 0; i < frames.length; i++) { | 4408 for (int i = 0; i < frames.length; i++) { |
4409 final Frame frame = frames[i]; | 4409 final Frame frame = frames[i]; |
4410 String frameText = await frame.toUserString(); | 4410 String frameText = await frame.toUserString(); |
4411 print('#${i.toString().padLeft(3)}: $frameText'); | 4411 print('#${i.toString().padLeft(3)}: $frameText'); |
4412 } | 4412 } |
4413 } | 4413 } |
4414 | 4414 |
4415 class Frame extends ServiceObject implements M.Frame { | 4415 class Frame extends ServiceObject implements M.Frame { |
4416 M.FrameKind kind = M.FrameKind.regular; | 4416 M.FrameKind kind = M.FrameKind.regular; |
4417 int index; | 4417 int index; |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4452 String toString() { | 4452 String toString() { |
4453 if (function != null) { | 4453 if (function != null) { |
4454 return "Frame([$kind] ${function.qualifiedName} $location)"; | 4454 return "Frame([$kind] ${function.qualifiedName} $location)"; |
4455 } else if (location != null) { | 4455 } else if (location != null) { |
4456 return "Frame([$kind] $location)"; | 4456 return "Frame([$kind] $location)"; |
4457 } else { | 4457 } else { |
4458 return "Frame([$kind])"; | 4458 return "Frame([$kind])"; |
4459 } | 4459 } |
4460 } | 4460 } |
4461 | 4461 |
4462 String toUserString() async { | 4462 Future<String> toUserString() async { |
4463 if (function != null) { | 4463 if (function != null) { |
4464 return "Frame([$kind] ${function.qualifiedName} " | 4464 return "Frame([$kind] ${function.qualifiedName} " |
4465 "${await location.toUserString()})"; | 4465 "${await location.toUserString()})"; |
4466 } else if (location != null) { | 4466 } else if (location != null) { |
4467 return "Frame([$kind] ${await location.toUserString()}"; | 4467 return "Frame([$kind] ${await location.toUserString()}"; |
4468 } else { | 4468 } else { |
4469 return "Frame([$kind])"; | 4469 return "Frame([$kind])"; |
4470 } | 4470 } |
4471 } | 4471 } |
4472 } | 4472 } |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4573 var v = list[i]; | 4573 var v = list[i]; |
4574 if ((v is Map) && _isServiceMap(v)) { | 4574 if ((v is Map) && _isServiceMap(v)) { |
4575 list[i] = owner.getFromMap(v); | 4575 list[i] = owner.getFromMap(v); |
4576 } else if (v is List) { | 4576 } else if (v is List) { |
4577 _upgradeList(v, owner); | 4577 _upgradeList(v, owner); |
4578 } else if (v is Map) { | 4578 } else if (v is Map) { |
4579 _upgradeMap(v, owner); | 4579 _upgradeMap(v, owner); |
4580 } | 4580 } |
4581 } | 4581 } |
4582 } | 4582 } |
OLD | NEW |