2
0
mirror of synced 2025-02-10 05:23:28 +00:00

24 lines
490 B
JavaScript
Raw Normal View History

2017-05-24 17:02:41 +01:00
import { NativeModules } from 'react-native';
2017-05-24 12:37:52 +01:00
const FirebasePerformance = NativeModules.RNFirebasePerformance;
export default class Trace {
constructor(perf: Object, identifier: string) {
this.perf = perf;
this.identifier = identifier;
}
start() {
FirebasePerformance.start(this.identifier);
}
stop() {
FirebasePerformance.stop(this.identifier);
}
incrementCounter(event: string) {
FirebasePerformance.incrementCounter(this.identifier, event);
}
}