refactor(benchpress): convert src and test to typescript

Fixes #2007
This commit is contained in:
Jeff Cross
2015-05-27 14:57:54 -07:00
parent f9908cd436
commit e323c07ab9
79 changed files with 3055 additions and 3295 deletions

View File

@ -0,0 +1,32 @@
import {bind} from 'angular2/di';
import {Promise, PromiseWrapper} from 'angular2/src/facade/async';
import {ABSTRACT, BaseException} from 'angular2/src/facade/lang';
import {StringMap} from 'angular2/src/facade/collection';
/**
* A metric is measures values
*/
@ABSTRACT()
export class Metric {
static bindTo(delegateToken) {
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<StringMap<string, any>> { throw new BaseException('NYI'); }
/**
* Describes the metrics provided by this metric implementation.
* (e.g. units, ...)
*/
describe(): StringMap<string, any> { throw new BaseException('NYI'); }
}