mathiasbynens / mathiasbynens/jsperf.com

Support asynchronous test setup

Open
#244 0 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
JavaScript
Stars
471
Forks
53
PR merge metrics
No merged PRs in 30d

Description

I want to judge the relative performance of some image-blurring algorithms in JS, but there's not really a great way in jsperf, since I need the image to already be downloaded before the test starts (since the image-loading is not a part of my scenario). I see that async test cases are already supported. It would be nice to also have async setup/teardown.

In the meantime, I guess I just have to make the first case a dummy case that wastes enough time so as to allow the image to finish loading.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the existing support for asynchronous test cases and trace how setup and teardown currently run around a benchmark. Define when asynchronous setup must finish before measurement and when teardown completes afterward. Done means image-loading or other asynchronous preparation can occur outside the measured scenario, with the behavior covered by tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
testing-qa
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.