| Index: runtime/bin/vmservice/observatory/test/vm_metrics_test.dart
|
| diff --git a/runtime/bin/vmservice/observatory/test/metrics_test.dart b/runtime/bin/vmservice/observatory/test/vm_metrics_test.dart
|
| similarity index 55%
|
| copy from runtime/bin/vmservice/observatory/test/metrics_test.dart
|
| copy to runtime/bin/vmservice/observatory/test/vm_metrics_test.dart
|
| index 170835f42f4e05e3f99d17486219880fd5c69c55..349f212d8a19ab188cbed60a3608ff84d9587ab8 100644
|
| --- a/runtime/bin/vmservice/observatory/test/metrics_test.dart
|
| +++ b/runtime/bin/vmservice/observatory/test/vm_metrics_test.dart
|
| @@ -13,24 +13,24 @@ void script() {
|
| var tests = [
|
|
|
| (Isolate isolate) =>
|
| - isolate.get('metrics').then((ServiceMap metrics) {
|
| + isolate.get('metrics/vm').then((ServiceMap metrics) {
|
| expect(metrics['type'], equals('MetricList'));
|
| var members = metrics['members'];
|
| expect(members, isList);
|
| - expect(members.length, equals(1));
|
| - var counter = members[0];
|
| - expect(counter['name'], equals('a.b.c'));
|
| - expect(counter['value'], equals(1234.5));
|
| + expect(members.length, greaterThan(1));
|
| + var foundOldHeapCapacity = members.any((m) =>
|
| + m['name'] == 'heap.old.capacity');
|
| + expect(foundOldHeapCapacity, equals(true));
|
| }),
|
|
|
| (Isolate isolate) =>
|
| - isolate.get('metrics/a.b.c').then((ServiceMap counter) {
|
| - expect(counter['name'], equals('a.b.c'));
|
| - expect(counter['value'], equals(1234.5));
|
| + isolate.get('metrics/vm/heap.old.used').then((ServiceMap counter) {
|
| + expect(counter['type'], equals('Counter'));
|
| + expect(counter['name'], equals('heap.old.used'));
|
| }),
|
|
|
| (Isolate isolate) =>
|
| - isolate.get('metrics/a.b.d').then((DartError err) {
|
| + isolate.get('metrics/vm/doesnotexist').then((DartError err) {
|
| expect(err is DartError, isTrue);
|
| }),
|
|
|
|
|