| 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 /// A [ServiceObject] is an object known to the VM service and is tied | 7 /// A [ServiceObject] is an object known to the VM service and is tied |
| 8 /// to an owning [Isolate]. | 8 /// to an owning [Isolate]. |
| 9 abstract class ServiceObject extends Observable { | 9 abstract class ServiceObject extends Observable { |
| 10 /// The owner of this [ServiceObject]. This can be an [Isolate], a | 10 /// The owner of this [ServiceObject]. This can be an [Isolate], a |
| (...skipping 477 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 488 } | 488 } |
| 489 } | 489 } |
| 490 } | 490 } |
| 491 | 491 |
| 492 class HeapSpace extends Observable { | 492 class HeapSpace extends Observable { |
| 493 @observable int used = 0; | 493 @observable int used = 0; |
| 494 @observable int capacity = 0; | 494 @observable int capacity = 0; |
| 495 @observable int external = 0; | 495 @observable int external = 0; |
| 496 @observable int collections = 0; | 496 @observable int collections = 0; |
| 497 @observable double totalCollectionTimeInSeconds = 0.0; | 497 @observable double totalCollectionTimeInSeconds = 0.0; |
| 498 @observable double averageCollectionPeriodInMillis = 0.0; |
| 498 | 499 |
| 499 void update(Map heapMap) { | 500 void update(Map heapMap) { |
| 500 used = heapMap['used']; | 501 used = heapMap['used']; |
| 501 capacity = heapMap['capacity']; | 502 capacity = heapMap['capacity']; |
| 502 external = heapMap['external']; | 503 external = heapMap['external']; |
| 503 collections = heapMap['collections']; | 504 collections = heapMap['collections']; |
| 504 totalCollectionTimeInSeconds = heapMap['time']; | 505 totalCollectionTimeInSeconds = heapMap['time']; |
| 506 averageCollectionPeriodInMillis = heapMap['avgCollectionPeriodMillis']; |
| 505 } | 507 } |
| 506 } | 508 } |
| 507 | 509 |
| 508 /// State for a running isolate. | 510 /// State for a running isolate. |
| 509 class Isolate extends ServiceObjectOwner { | 511 class Isolate extends ServiceObjectOwner { |
| 510 @reflectable VM get vm => owner; | 512 @reflectable VM get vm => owner; |
| 511 @reflectable Isolate get isolate => this; | 513 @reflectable Isolate get isolate => this; |
| 512 @observable ObservableMap counters = new ObservableMap(); | 514 @observable ObservableMap counters = new ObservableMap(); |
| 513 | 515 |
| 514 String get link => '/${_id}'; | 516 String get link => '/${_id}'; |
| (...skipping 1312 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1827 var v = list[i]; | 1829 var v = list[i]; |
| 1828 if ((v is ObservableMap) && _isServiceMap(v)) { | 1830 if ((v is ObservableMap) && _isServiceMap(v)) { |
| 1829 list[i] = owner.getFromMap(v); | 1831 list[i] = owner.getFromMap(v); |
| 1830 } else if (v is ObservableList) { | 1832 } else if (v is ObservableList) { |
| 1831 _upgradeObservableList(v, owner); | 1833 _upgradeObservableList(v, owner); |
| 1832 } else if (v is ObservableMap) { | 1834 } else if (v is ObservableMap) { |
| 1833 _upgradeObservableMap(v, owner); | 1835 _upgradeObservableMap(v, owner); |
| 1834 } | 1836 } |
| 1835 } | 1837 } |
| 1836 } | 1838 } |
| OLD | NEW |