Skip to content

Commit

Permalink
Use time-resolution
Browse files Browse the repository at this point in the history
  • Loading branch information
ehmicky committed Aug 25, 2019
1 parent b2db5ea commit 298bd12
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 75 deletions.
9 changes: 9 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@
"slugify": "^1.3.4",
"string-width": "^4.1.0",
"strip-ansi": "^5.2.0",
"time-resolution": "^0.1.1",
"uuid": "^3.3.3",
"write-file-atomic": "^3.0.0",
"yargs": "^14.0.0",
Expand Down
73 changes: 0 additions & 73 deletions src/resolution.js

This file was deleted.

5 changes: 3 additions & 2 deletions src/run/runners/node/benchmark/bias.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { getTimeResolution } from '../../../../resolution.js'
import timeResolution from 'time-resolution'

import { getMedian } from '../../../../stats/methods.js'

import { benchmarkLoop } from './loop.js'
Expand Down Expand Up @@ -58,7 +59,7 @@ const getMinTime = function(nowBias) {
return Math.max(minPrecisionTime, minNowBiasTime)
}

const TIME_RESOLUTION = getTimeResolution()
const TIME_RESOLUTION = timeResolution()
// The task loop must be at least `MIN_PRECISION` slower than time resolution
const MIN_PRECISION = 1e2
// The task loop must be at least `MIN_NOW_BIAS` slower than `nowBias`
Expand Down

0 comments on commit 298bd12

Please sign in to comment.