forked from angular/angular
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmetric.ts
More file actions
29 lines (25 loc) · 855 Bytes
/
metric.ts
File metadata and controls
29 lines (25 loc) · 855 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
import {bind, provide, Provider} from 'angular2/src/core/di';
import {BaseException, WrappedException} from 'angular2/src/facade/exceptions';
/**
* A metric is measures values
*/
export abstract class Metric {
static bindTo(delegateToken): Provider[] {
return [bind(Metric).toFactory((delegate) => delegate, [delegateToken])];
}
/**
* Starts measuring
*/
beginMeasure(): Promise<any> { throw new BaseException('NYI'); }
/**
* Ends measuring and reports the data
* since the begin call.
* @param restart: Whether to restart right after this.
*/
endMeasure(restart: boolean): Promise<{[key: string]: any}> { throw new BaseException('NYI'); }
/**
* Describes the metrics provided by this metric implementation.
* (e.g. units, ...)
*/
describe(): {[key: string]: any} { throw new BaseException('NYI'); }
}