2017-05-24 12:37:52 +01:00
|
|
|
export default class Trace {
|
|
|
|
|
|
|
|
constructor(perf: Object, identifier: string) {
|
|
|
|
this.perf = perf;
|
|
|
|
this.identifier = identifier;
|
|
|
|
}
|
|
|
|
|
|
|
|
start() {
|
2017-06-30 17:23:32 +01:00
|
|
|
this.perf._native.start(this.identifier);
|
2017-05-24 12:37:52 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
stop() {
|
2017-06-30 17:23:32 +01:00
|
|
|
this.perf._native.stop(this.identifier);
|
2017-05-24 12:37:52 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
incrementCounter(event: string) {
|
2017-06-30 17:23:32 +01:00
|
|
|
this.perf._native.incrementCounter(this.identifier, event);
|
2017-05-24 12:37:52 +01:00
|
|
|
}
|
|
|
|
}
|