Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(202)

Unified Diff: runtime/bin/vmservice/observatory/test/vm_metrics_test.dart

Issue 464953002: Add VMMetric and some sample metrics (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | runtime/vm/dart.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
}),
« no previous file with comments | « no previous file | runtime/vm/dart.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698