2015-02-11 10:13:49 -08:00
|
|
|
import {
|
|
|
|
|
Promise, PromiseWrapper
|
|
|
|
|
} from 'angular2/src/facade/async';
|
|
|
|
|
import {
|
|
|
|
|
ABSTRACT, BaseException
|
|
|
|
|
} from 'angular2/src/facade/lang';
|
2015-02-18 09:04:02 -08:00
|
|
|
import { StringMap } from 'angular2/src/facade/collection';
|
2015-02-11 10:13:49 -08:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* A metric is measures values
|
|
|
|
|
*/
|
|
|
|
|
@ABSTRACT()
|
|
|
|
|
export class Metric {
|
|
|
|
|
/**
|
|
|
|
|
* Starts measuring
|
|
|
|
|
*/
|
|
|
|
|
beginMeasure():Promise {
|
|
|
|
|
throw new BaseException('NYI');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Ends measuring and reports the data
|
|
|
|
|
* since the begin call.
|
|
|
|
|
* @param restart: Whether to restart right after this.
|
|
|
|
|
*/
|
2015-02-18 09:04:02 -08:00
|
|
|
endMeasure(restart:boolean):Promise<StringMap> {
|
2015-02-11 10:13:49 -08:00
|
|
|
throw new BaseException('NYI');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Describes the metrics provided by this metric implementation.
|
|
|
|
|
* (e.g. units, ...)
|
|
|
|
|
*/
|
2015-02-18 09:04:02 -08:00
|
|
|
describe():StringMap {
|
2015-02-11 10:13:49 -08:00
|
|
|
throw new BaseException('NYI');
|
|
|
|
|
}
|
|
|
|
|
}
|