72 lines
3.4 KiB
React
72 lines
3.4 KiB
React
/* Metro module 6495; source: unknown; dependencies: [6374, 6375, 6394, 6496] */
|
|
function _fun51163(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#51163, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6673:6, offset: 0x0122ac3b, size: 104 bytes, params: 8, frame: 18
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
const env0_2 = importDefault(6374) /* metro dependency 6374 */;
|
|
const env0_3 = importDefault(6375) /* metro dependency 6375 */;
|
|
exports.JSFPSMonitor = _fun51164();
|
|
}
|
|
|
|
function _fun51164() { // fn#51164, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6673:118, offset: 0x0122aca3, size: 101 bytes, params: 1, frame: 15
|
|
return env0_3(JSFPSMonitor_51165, [{key: 'measureLoop', value: function() {
|
|
this.clearAnimationNumber = global.requestAnimationFrame(this.updateLoopCompute);
|
|
}}, {key: 'startTracking', value: value_51168}, {key: 'stopAndGetData', value: value_51169}]);
|
|
}
|
|
|
|
function JSFPSMonitor_51165() { // fn#51165, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6673:139, offset: 0x0122ad08, size: 116 bytes, params: 1, frame: 14
|
|
env1_2(this, JSFPSMonitor_51165);
|
|
this.startTime = 0;
|
|
this.frameCount = 0;
|
|
this.timeWindow = {'frameCount': 0, 'startTime': 0};
|
|
const Number = global.Number;
|
|
const MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER;
|
|
this.minFPS = MAX_SAFE_INTEGER;
|
|
this.maxFPS = 0;
|
|
this.averageFPS = 0;
|
|
this.clearAnimationNumber = 0;
|
|
this.updateLoopCompute = updateLoopCompute;
|
|
}
|
|
|
|
function value_51168() { // fn#51168, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6673:889, offset: 0x0122ad7c, size: 146 bytes, params: 1, frame: 12
|
|
var Error;
|
|
var value;
|
|
var fpsMonitorAlreadyRunning;
|
|
if (this.startTime !== 0) {
|
|
Error = global.Error;
|
|
value = environment.__proto__;
|
|
fpsMonitorAlreadyRunning = (require(6394) /* metro dependency 6394 */).ErrorMessages.fpsMonitorAlreadyRunning;
|
|
throw new Error();
|
|
}
|
|
let Date = global.Date;
|
|
this.startTime = Date.now();
|
|
const timeWindow = this.timeWindow;
|
|
Date = global.Date;
|
|
timeWindow.startTime = Date.now();
|
|
this.measureLoop();
|
|
}
|
|
|
|
function value_51169() { // fn#51169, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6673:1112, offset: 0x0122ae0e, size: 187 bytes, params: 1, frame: 19
|
|
var averageFPS;
|
|
global.cancelAnimationFrame(this.clearAnimationNumber);
|
|
const minFPS = this.minFPS;
|
|
const Number = global.Number;
|
|
const MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER;
|
|
if (minFPS === MAX_SAFE_INTEGER) {
|
|
averageFPS = this.averageFPS;
|
|
this.minFPS = averageFPS;
|
|
averageFPS = this.averageFPS;
|
|
this.maxFPS = averageFPS;
|
|
}
|
|
const object2 = {};
|
|
let value = environment.__proto__;
|
|
value = require(6496) /* metro dependency 6496 */;
|
|
object2.minFPS = value.roundToDecimalPlaces(this.minFPS, 1);
|
|
value = require(6496) /* metro dependency 6496 */;
|
|
object2.maxFPS = value.roundToDecimalPlaces(this.maxFPS, 1);
|
|
value = require(6496) /* metro dependency 6496 */;
|
|
object2.averageFPS = value.roundToDecimalPlaces(this.averageFPS, 1);
|
|
return object2;
|
|
}
|
|
|