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

Side by Side Diff: tests/lib/profiler/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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « sdk/lib/profiler/profiler.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 5
6 import 'dart:profiler'; 6 import 'dart:profiler';
7 import 'package:expect/expect.dart'; 7 import 'package:expect/expect.dart';
8 8
9 testGauge1() { 9 testGauge1() {
10 var gauge = new Gauge('test', 'alpha bravo', 0.0, 100.0); 10 var gauge = new Gauge('test', 'alpha bravo', 0.0, 100.0);
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 Metrics.deregister(counter); 92 Metrics.deregister(counter);
93 Metrics.register(counter); 93 Metrics.register(counter);
94 var counter3 = new Counter('a.b.c.d', ''); 94 var counter3 = new Counter('a.b.c.d', '');
95 Metrics.register(counter3); 95 Metrics.register(counter3);
96 } 96 }
97 97
98 testBadName() { 98 testBadName() {
99 Expect.throws(() { 99 Expect.throws(() {
100 var counter = new Counter('a.b/c', 'description'); 100 var counter = new Counter('a.b/c', 'description');
101 }); 101 });
102 Expect.throws(() {
103 var counter = new Counter('vm', 'description');
104 });
102 } 105 }
103 106
104 main() { 107 main() {
105 testGauge1(); 108 testGauge1();
106 testGauge2(); 109 testGauge2();
107 testCounter(); 110 testCounter();
108 testCustomCounter(); 111 testCustomCounter();
109 testMetricNameCollision(); 112 testMetricNameCollision();
110 testBadName(); 113 testBadName();
111 } 114 }
OLDNEW
« no previous file with comments | « sdk/lib/profiler/profiler.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698