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

59 lines
3.3 KiB
JavaScript

/* Metro module 7467; source: unknown; dependencies: [7396, 7397, 7369] */
import * as Module07369Module from './module-07369.js'; /* Metro dependency 7369 */
import * as Module07396Module from './module-07396.js'; /* Metro dependency 7396 */
import * as DEBUG_BUILDModule from './module-07397-DEBUG_BUILD.js'; /* Metro dependency 7397 */
function _fun60221(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#60221, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7645:6, offset: 0x016fe6d0, size: 92 bytes, params: 8, frame: 16
const env0_0 = require;
const isProfilingIntegrationWithProfiler_60222 = function(a0) {
return (a0 ? a0._profiler !== undefined : !!a0) && typeof a0._profiler.start === 'function' && typeof a0._profiler.stop === 'function';
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
exports.profiler = {startProfiler: startProfiler_60223, stopProfiler: stopProfiler_60224};
function startProfiler_60223() { // fn#60223, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7645:254, offset: 0x016fe72c, size: 314 bytes, params: 1, frame: 14
const DEBUG_BUILD = (DEBUG_BUILDModule).DEBUG_BUILD;
const logger = (Module07369Module).logger;
var integrationByName;
const client = (Module07396Module).getClient();
if (client) {
integrationByName = client.getIntegrationByName('ProfilingIntegration');
if (integrationByName) {
if (isProfilingIntegrationWithProfiler_60222(integrationByName)) {
integrationByName._profiler.start();
} else if (DEBUG_BUILD) {
logger.warn('Profiler is not available on profiling integration.');
}
} else if (DEBUG_BUILD) {
logger.warn('ProfilingIntegration is not available');
}
} else if (DEBUG_BUILD) {
logger.warn('No Sentry client available, profiling is not started');
}
}
function stopProfiler_60224() { // fn#60224, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7645:718, offset: 0x016fe866, size: 315 bytes, params: 1, frame: 14
const DEBUG_BUILD = (DEBUG_BUILDModule).DEBUG_BUILD;
const logger = (Module07369Module).logger;
var integrationByName;
const client = (Module07396Module).getClient();
if (client) {
integrationByName = client.getIntegrationByName('ProfilingIntegration');
if (integrationByName) {
if (isProfilingIntegrationWithProfiler_60222(integrationByName)) {
integrationByName._profiler.stop();
} else if (DEBUG_BUILD) {
logger.warn('Profiler is not available on profiling integration.');
}
} else if (DEBUG_BUILD) {
logger.warn('ProfilingIntegration is not available');
}
} else if (DEBUG_BUILD) {
logger.warn('No Sentry client available, profiling is not started');
}
}
}
global.__d(_fun60221, 7467, [7396, 7397, 7369]) /* metro module 7467, dependencies: [7396, 7397, 7369] */;