mirror of
https://github.com/lowdefy/lowdefy.git
synced 2025-02-17 14:30:34 +08:00
fix(engine): Update benchmark test to pass.
This commit is contained in:
parent
3924304ca6
commit
529f65e647
@ -27,12 +27,11 @@ const runTests = ({ times, results = [], fn }) => {
|
|||||||
if (times <= 0) {
|
if (times <= 0) {
|
||||||
return results;
|
return results;
|
||||||
}
|
}
|
||||||
// try {
|
|
||||||
// eslint-disable-next-line no-undef
|
// eslint-disable-next-line no-undef
|
||||||
const start = performance.now();
|
const start = Date.now();
|
||||||
fn(times);
|
fn(times);
|
||||||
// eslint-disable-next-line no-undef
|
// eslint-disable-next-line no-undef
|
||||||
const end = performance.now();
|
const end = Date.now();
|
||||||
const duration = end - start;
|
const duration = end - start;
|
||||||
|
|
||||||
return runTests({
|
return runTests({
|
||||||
@ -40,10 +39,6 @@ const runTests = ({ times, results = [], fn }) => {
|
|||||||
results: results.concat([duration]),
|
results: results.concat([duration]),
|
||||||
fn,
|
fn,
|
||||||
});
|
});
|
||||||
// } catch (e) {
|
|
||||||
// console.error(e);
|
|
||||||
// process.exit(1);
|
|
||||||
// }
|
|
||||||
};
|
};
|
||||||
|
|
||||||
test(`parse nunjucks value 500 blocks`, async () => {
|
test(`parse nunjucks value 500 blocks`, async () => {
|
||||||
|
Loading…
Reference in New Issue
Block a user