Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/libs/Firebase/index.native.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/* eslint-disable no-unused-vars */
import perf from '@react-native-firebase/perf';
import lodashGet from 'lodash/get';
import * as Environment from '../Environment/Environment';
import Log from '../Log';

Expand Down Expand Up @@ -32,19 +33,19 @@ function startTrace(customEventName) {
*/
function stopTrace(customEventName) {
const stop = global.performance.now();

if (Environment.isDevelopment()) {
return;
}

const {trace, start} = traceMap[customEventName];
const trace = lodashGet(traceMap, [customEventName, 'trace']);
if (!trace) {
return;
}

trace.stop();

// Uncomment to inspect logs on release builds
// const start = lodashGet(traceMap, [customEventName, 'start']);
// Log.info(`sidebar_loaded: ${stop - start} ms`, true);

delete traceMap[customEventName];
Expand Down