151 lines
6.6 KiB
React
151 lines
6.6 KiB
React
/* Metro module 205; source: unknown; dependencies: [6, 7] */
|
|
function _fun2893(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#2893, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:230:6, offset: 0x00c8bbff, size: 136 bytes, params: 8, frame: 19
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
const env0_1 = importDefault(6) /* metro dependency 6 */;
|
|
const env0_2 = importDefault(7) /* metro dependency 7 */;
|
|
const r1 = global.nativeQPLTimestamp ?? _fun2894;
|
|
const env0_4 = _fun2895();
|
|
exports.default = createPerformanceLogger;
|
|
exports.getCurrentTimestamp = r1;
|
|
}
|
|
|
|
function _fun2894() { // fn#2894, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:230:157, offset: 0x00c8bc87, size: 24 bytes, params: 1, frame: 9
|
|
return env0_0.performance.now();
|
|
}
|
|
|
|
function _fun2895() { // fn#2895, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:230:198, offset: 0x00c8bc9f, size: 456 bytes, params: 1, frame: 15
|
|
return env0_2(PerformanceLogger, [{key: 'addTimespan', value: function(a0, a1, a2, a3, a4) {
|
|
var value = a1;
|
|
if (!(this._closed || this._timespans[a0])) {
|
|
this._timespans[a0] = {startTime: value, endTime: a2, totalTime: a2 - (value || 0), startExtras: a3,
|
|
endExtras: a4};
|
|
}
|
|
}}, {key: 'append', value: value_2898}, {key: 'clear', value: function() {
|
|
this._timespans = {};
|
|
this._extras = {};
|
|
this._points = {};
|
|
}}, {key: 'clearCompleted', value: function() {
|
|
var r5;
|
|
var r8;
|
|
var propertyName;
|
|
var propertyName2;
|
|
var property;
|
|
var totalTime;
|
|
var _timespans = this._timespans;
|
|
var value = undefined;
|
|
for (propertyName in _timespans) {
|
|
property = this._timespans[propertyName];
|
|
if (property == null) {
|
|
r8 = value;
|
|
continue;
|
|
}
|
|
totalTime = property.totalTime;
|
|
r8 = totalTime;
|
|
if (r8 == null) {
|
|
r5 = propertyName2;
|
|
continue;
|
|
}
|
|
delete this._timespans[propertyName];
|
|
r5 = propertyName2;
|
|
}
|
|
this._extras = {};
|
|
this._points = {};
|
|
return value;
|
|
}}, {key: 'close', value: function() {
|
|
this._closed = true;
|
|
}}, {key: 'currentTimestamp', value: value_2902}, {key: 'getExtras', value: function() {
|
|
return this._extras;
|
|
}}, {key: 'getPoints', value: function() {
|
|
return this._points;
|
|
}}, {key: 'getPointExtras', value: function() {
|
|
return this._pointExtras;
|
|
}}, {key: 'getTimespans', value: function() {
|
|
return this._timespans;
|
|
}}, {key: 'hasTimespan', value: function(a0) {
|
|
return !!this._timespans[a0];
|
|
}}, {key: 'isClosed', value: function() {
|
|
return this._closed;
|
|
}}, {key: 'logEverything', value: function() {
|
|
}}, {key: 'markPoint', value: value_2910}, {key: 'removeExtra', value: function(a0) {
|
|
var property = this._extras[a0];
|
|
delete this._extras[a0];
|
|
return property;
|
|
}}, {key: 'setExtra', value: function(a0, a1) {
|
|
if (!(this._closed || this._extras.hasOwnProperty(a0))) {
|
|
this._extras[a0] = a1;
|
|
}
|
|
}}, {key: 'startTimespan', value: value_2913}, {key: 'stopTimespan', value: value_2914}]);
|
|
}
|
|
|
|
function PerformanceLogger() { // fn#2896, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:230:219, offset: 0x00c8be67, size: 67 bytes, params: 1, frame: 13
|
|
env1_1(this, PerformanceLogger);
|
|
this._timespans = {};
|
|
this._extras = {};
|
|
this._points = {};
|
|
this._pointExtras = {};
|
|
this._closed = false;
|
|
}
|
|
|
|
function value_2898(a0) { // fn#2898, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:230:568, offset: 0x00c8bf04, size: 180 bytes, params: 2, frame: 18
|
|
let Object = global.Object;
|
|
this._timespans = Object.assign({}, a0.getTimespans(), this._timespans);
|
|
Object = global.Object;
|
|
this._extras = Object.assign({}, a0.getExtras(), this._extras);
|
|
Object = global.Object;
|
|
this._points = Object.assign({}, a0.getPoints(), this._points);
|
|
Object = global.Object;
|
|
this._pointExtras = Object.assign({}, a0.getPointExtras(), this._pointExtras);
|
|
}
|
|
|
|
function value_2902() { // fn#2902, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:230:1225, offset: 0x00c8c042, size: 15 bytes, params: 1, frame: 9
|
|
return env1_3();
|
|
}
|
|
|
|
function value_2910(a0) { // fn#2910, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:230:1774, offset: 0x00c8c0a0, size: 114 bytes, params: 2, frame: 15
|
|
const value = undefined;
|
|
const r5 = arguments.length > 1 && value !== arguments[1] ? arguments[1] : env1_3();
|
|
const r2 = arguments.length > 2 ? arguments[2] : value;
|
|
if (!this._closed) {
|
|
if (this._points[a0] == null) {
|
|
this._points[a0] = r5;
|
|
if (r2) {
|
|
this._pointExtras[a0] = r2;
|
|
}
|
|
}
|
|
}
|
|
return value;
|
|
}
|
|
|
|
function value_2913(a0) { // fn#2913, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:230:2234, offset: 0x00c8c162, size: 110 bytes, params: 2, frame: 15
|
|
const value = undefined;
|
|
if (!(this._closed || this._timespans[a0])) {
|
|
this._timespans[a0] = {startTime: arguments.length > 1 && value !== arguments[1] ? arguments[1] : env1_3(),
|
|
startExtras: arguments.length > 2 ? arguments[2] : value};
|
|
}
|
|
return value;
|
|
}
|
|
|
|
function value_2914(a0) { // fn#2914, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:230:2477, offset: 0x00c8c1d0, size: 160 bytes, params: 2, frame: 14
|
|
var r4;
|
|
var startTime;
|
|
var property;
|
|
var endTime;
|
|
const value = undefined;
|
|
if (!this._closed) {
|
|
property = this._timespans[a0];
|
|
r4 = property && property.startTime != null;
|
|
r4 = r4 && property.endTime == null;
|
|
if (r4) {
|
|
property.endExtras = arguments.length > 2 ? arguments[2] : value;
|
|
property.endTime = arguments.length > 1 && value !== arguments[1] ? arguments[1] : env1_3();
|
|
endTime = property.endTime;
|
|
startTime = property.startTime;
|
|
startTime = !startTime ? 0 : startTime;
|
|
property.totalTime = endTime - startTime;
|
|
}
|
|
}
|
|
return value;
|
|
}
|
|
|