44 lines
1.8 KiB
JavaScript
44 lines
1.8 KiB
JavaScript
// Metro module 932 (f933).
|
|
import { getClient } from "./Module848";
|
|
import { DEBUG_BUILD } from "./Module823";
|
|
import { debug } from "./consoleSandbox";
|
|
Object.defineProperty(exports, Symbol.toStringTag, {
|
|
value: "Module"
|
|
});
|
|
export const profiler = {
|
|
startProfiler: function startProfiler() {
|
|
const client = getClient();
|
|
if (client) {
|
|
const integrationByName = client.getIntegrationByName("ProfilingIntegration");
|
|
if (integrationByName) {
|
|
if (!!integrationByName && integrationByName._profiler !== void 0 && typeof integrationByName._profiler.start === "function" && typeof integrationByName._profiler.stop === "function") {
|
|
integrationByName._profiler.start();
|
|
} else if (DEBUG_BUILD) {
|
|
debug.warn("Profiler is not available on profiling integration.");
|
|
}
|
|
} else if (DEBUG_BUILD) {
|
|
debug.warn("ProfilingIntegration is not available");
|
|
}
|
|
} else if (DEBUG_BUILD) {
|
|
debug.warn("No Sentry client available, profiling is not started");
|
|
}
|
|
},
|
|
stopProfiler: function stopProfiler() {
|
|
const client = getClient();
|
|
if (client) {
|
|
const integrationByName = client.getIntegrationByName("ProfilingIntegration");
|
|
if (integrationByName) {
|
|
if (!!integrationByName && integrationByName._profiler !== void 0 && typeof integrationByName._profiler.start === "function" && typeof integrationByName._profiler.stop === "function") {
|
|
integrationByName._profiler.stop();
|
|
} else if (DEBUG_BUILD) {
|
|
debug.warn("Profiler is not available on profiling integration.");
|
|
}
|
|
} else if (DEBUG_BUILD) {
|
|
debug.warn("ProfilingIntegration is not available");
|
|
}
|
|
} else if (DEBUG_BUILD) {
|
|
debug.warn("No Sentry client available, profiling is not started");
|
|
}
|
|
}
|
|
};
|