Skip to content

Commit 2d61d71

Browse files
author
alxndrsn
committed
revert loop change and add lint exception
1 parent 08fe7f6 commit 2d61d71

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

packages/pg/bench.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,14 @@ const exec = async (client, q) => {
2525
const bench = async (client, q, time) => {
2626
let start = Date.now()
2727
let count = 0
28-
do {
28+
// eslint-disable-next-line no-constant-condition
29+
while (true) {
2930
await exec(client, q)
3031
count++
31-
} while (Date.now() - start > time)
32-
return count
32+
if (Date.now() - start > time) {
33+
return count
34+
}
35+
}
3336
}
3437

3538
const run = async () => {

0 commit comments

Comments
 (0)