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 4438 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4449 | 4449 |
4450 bool get immutable => false; | 4450 bool get immutable => false; |
4451 | 4451 |
4452 Future<Map> _fetchDirect({int count: kDefaultFieldLimit}) { | 4452 Future<Map> _fetchDirect({int count: kDefaultFieldLimit}) { |
4453 assert(owner is Isolate); | 4453 assert(owner is Isolate); |
4454 return isolate.invokeRpcNoUpgrade('_getIsolateMetric', {'metricId': id}); | 4454 return isolate.invokeRpcNoUpgrade('_getIsolateMetric', {'metricId': id}); |
4455 } | 4455 } |
4456 | 4456 |
4457 String description; | 4457 String description; |
4458 double value = 0.0; | 4458 double value = 0.0; |
4459 // Only a guage has a non-null min and max. | 4459 // Only a gauge has a non-null min and max. |
4460 double min; | 4460 double min; |
4461 double max; | 4461 double max; |
4462 | 4462 |
4463 bool get isGauge => (min != null) && (max != null); | 4463 bool get isGauge => (min != null) && (max != null); |
4464 | 4464 |
4465 void _update(Map map, bool mapIsRef) { | 4465 void _update(Map map, bool mapIsRef) { |
4466 name = map['name']; | 4466 name = map['name']; |
4467 description = map['description']; | 4467 description = map['description']; |
4468 vmName = map['name']; | 4468 vmName = map['name']; |
4469 value = map['value']; | 4469 value = map['value']; |
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4648 var v = list[i]; | 4648 var v = list[i]; |
4649 if ((v is Map) && _isServiceMap(v)) { | 4649 if ((v is Map) && _isServiceMap(v)) { |
4650 list[i] = owner.getFromMap(v); | 4650 list[i] = owner.getFromMap(v); |
4651 } else if (v is List) { | 4651 } else if (v is List) { |
4652 _upgradeList(v, owner); | 4652 _upgradeList(v, owner); |
4653 } else if (v is Map) { | 4653 } else if (v is Map) { |
4654 _upgradeMap(v, owner); | 4654 _upgradeMap(v, owner); |
4655 } | 4655 } |
4656 } | 4656 } |
4657 } | 4657 } |
OLD | NEW |