Skip to content

Commit

Permalink
fixup! fs: improve error perf of sync *times
Browse files Browse the repository at this point in the history
  • Loading branch information
CanadaHonk committed Sep 27, 2023
1 parent 23c1360 commit 8265a66
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions benchmark/fs/bench-timesSync.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ function main({ n, type, func }) {
const useFds = func === 'futimes';
const fsFunc = fs[func + 'Sync'];

const time = Date.now();
const time = Date.now() / 1000;

switch (type) {
case 'existing': {
Expand All @@ -30,11 +30,7 @@ function main({ n, type, func }) {

bench.start();
for (let i = 0; i < n; i++) {
try {
fsFunc(files[i], time, time);
} catch {
// do nothing
}
fsFunc(files[i], time, time);
}
bench.end(n);

Expand Down

0 comments on commit 8265a66

Please sign in to comment.