Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4821.js (118.4 MB)
44 lines
1.2 KiB
JavaScript
44 lines
1.2 KiB
JavaScript
// Module ID: 14507
|
|
// Function ID: 14508
|
|
// Dependencies: []
|
|
// Exports: default
|
|
|
|
// Module 14507
|
|
|
|
export default () => (startTimer) => {
|
|
closure_0 = startTimer;
|
|
startTimer = startTimer.startTimer;
|
|
return {
|
|
features: {
|
|
benchmark(title) {
|
|
const items = [];
|
|
closure_2 = items();
|
|
function step(title) {
|
|
let num = 0;
|
|
if (0 !== items.length) {
|
|
num = arr[arr.length - 1].time;
|
|
}
|
|
const tmp = closure_2();
|
|
items.push({ title, time: tmp, delta: tmp - num });
|
|
}
|
|
items.push({ title, time: 0, delta: 0 });
|
|
function stop(title) {
|
|
if (typeof step === "function") {
|
|
let num = 0;
|
|
if (0 !== items.length) {
|
|
num = arr[arr.length - 1].time;
|
|
}
|
|
const tmp3 = closure_2();
|
|
const obj = { title, time: tmp3, delta: tmp3 - num };
|
|
items.push(obj);
|
|
const obj2 = { title, steps: items };
|
|
title.send("benchmark.report", obj2);
|
|
} else {
|
|
throw new TypeError("Trying to call a non-function");
|
|
}
|
|
}
|
|
return { step, stop, last: stop };
|
|
}
|
|
}
|
|
};
|
|
};
|