Skip to content

Commit

Permalink
include console.log
Browse files Browse the repository at this point in the history
  • Loading branch information
christian-bromann committed Feb 26, 2024
1 parent 3680a96 commit 966f8f5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,11 +100,11 @@ async function benchmarkTest() {

bench
.add('faster task', () => {
// console.log('I am faster')
console.log('I am faster')
})
.add('slower task', async () => {
await new Promise(r => setTimeout(r, 1)) // we wait 1ms :)
// console.log('I am slower')
console.log('I am slower')
})

await bench.warmup(); // make results more reliable, ref: https://github.com/tinylibs/tinybench/pull/50
Expand Down
8 changes: 4 additions & 4 deletions examples/benchmark.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ async function benchmarkTest() {

bench
.add('faster task', () => {
// console.log('I am faster')
console.log('I am faster')
})
.add('slower task', async () => {
await new Promise(r => setTimeout(r, 1)) // we wait 1ms :)
// console.log('I am slower')
console.log('I am slower')
})

await bench.warmup(); // make results more reliable, ref: https://github.com/tinylibs/tinybench/pull/50
Expand All @@ -39,6 +39,6 @@ test('benchmark test in Firefox', async () => {
})
assert.ok(results[0].mean < 1)
// mean is around 5
assert.ok(results[1].mean > 4.5)
assert.ok(results[1].mean < 5.55)
assert.ok(results[1].mean > 5)
assert.ok(results[1].mean < 6)
})

0 comments on commit 966f8f5

Please sign in to comment.