Files
discord-decomp/sources/by-id/module-00940-profiler.js
2026-07-28 01:06:53 +03:00

61 lines
3.3 KiB
JavaScript

/* Metro module 940; source: unknown; dependencies: [857, 832, 833] */
import * as DEBUG_BUILDModule from './module-00832-DEBUG_BUILD.js'; /* Metro dependency 832 */
import * as Module00833Module from './module-00833.js'; /* Metro dependency 833 */
import * as Module00857Module from './module-00857.js'; /* Metro dependency 857 */
function _fun9999(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#9999, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1067:6, offset: 0x00d78d37, size: 104 bytes, params: 8, frame: 17
const env0_0 = require;
const isProfilingIntegrationWithProfiler = function(a0) {
return (a0 ? a0._profiler !== undefined : !!a0) && typeof a0._profiler.start === 'function' && typeof a0._profiler.stop === 'function';
};
const Object = global.Object;
const defineProperty = Object.defineProperty;
const Symbol = global.Symbol;
Reflect.apply(defineProperty, Object, [exports, Symbol.toStringTag, {value: 'Module'}]);
exports.profiler = {startProfiler: startProfiler, stopProfiler: stopProfiler};
function startProfiler() { // fn#10001, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1067:266, offset: 0x00d78dec, size: 314 bytes, params: 1, frame: 14
const DEBUG_BUILD = (DEBUG_BUILDModule).DEBUG_BUILD;
const debug = (Module00833Module).debug;
var integrationByName;
const client = (Module00857Module).getClient();
if (client) {
integrationByName = client.getIntegrationByName('ProfilingIntegration');
if (integrationByName) {
if (isProfilingIntegrationWithProfiler(integrationByName)) {
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');
}
}
function stopProfiler() { // fn#10002, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1067:727, offset: 0x00d78f26, size: 315 bytes, params: 1, frame: 14
const DEBUG_BUILD = (DEBUG_BUILDModule).DEBUG_BUILD;
const debug = (Module00833Module).debug;
var integrationByName;
const client = (Module00857Module).getClient();
if (client) {
integrationByName = client.getIntegrationByName('ProfilingIntegration');
if (integrationByName) {
if (isProfilingIntegrationWithProfiler(integrationByName)) {
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');
}
}
}
global.__d(_fun9999, 940, [857, 832, 833]) /* metro module 940, dependencies: [857, 832, 833] */;