-
-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add an option to introduce an artificial delay between iterations #92
Comments
|
@jerome-benoit Oh, I missed that. Thanks! Unfortunately, I went a different route anyways, since I'm also benchmarking on browsers and I have to contend with its reduced resolution (which can be as low as 1ms) and I needed a hard guarantee that I was getting accurate timings in spite of it. Also turned out to be pretty simple to roll, the hard part only being nailing down the right math for when to halt the test (I'm using a 99% confidence interval at the moment). |
tinybench works on browser. And I doubt the timestamping is made differently on JS benchmarking tools around there. |
Sorry, forgot to close. @jerome-benoit I took a cursory glance in the code, and I suspect my listed concern isn't accounted for, but I'll need to walk through some math and collect a bunch of links before I can file a proper bug report. Edit: filed #143 |
I'd like to migrate away from the unmaintained Benchmark.js to this, and while this has almost everything I need, I need a way to introduce artificial delay, because I want to make sure it's actually tracking a fresh new frame each time.
That uses a fairly arbitrary delay, but ideally, this delay would be a function so I could pass it a
() => new Promise(resolve => requestAnimationFrame(resolve))
function instead (as that's what I really need in practice).The text was updated successfully, but these errors were encountered: