DEV Community

pai da xin
pai da xin

Posted on

I Thought Building a CPS Test Would Take an Hour. I Was Wrong.

I Thought Building a CPS Test Would Take an Hour. I Was Wrong.

I started building a small CPS test because I wanted a simple way to
measure click speed in the browser.

My first assumption was straightforward: count clicks, divide by time,
and show the result.

But once I began testing it, the details became more interesting than I
expected.

The first version was too simple

My initial version used a basic timer and counted every click.

It worked, but I quickly noticed that a CPS score can feel unfair if the
test does not clearly answer a few questions:

  • When should the timer start?
  • Should keyboard input count too?
  • Does a one-second test mean the same thing as a ten-second test?
  • What happens when the browser loses focus?

Those decisions affect the result more than I expected.

Starting on the first click

The most important decision was when to start the timer.

I decided that the first valid click should start the test. This means
the user does not lose time trying to react to a countdown. After that,
every valid input is counted until the selected duration ends.

It is a small interaction detail, but it makes the test easier to
understand and repeat.

Why I included different test lengths

A one-second test is fun, but it can be influenced by a short burst of
speed. A longer test is usually more stable.

That is why I included 1, 5, 10, and 30-second options, as well as a
custom duration. I think comparing several attempts is more useful than
treating one score as a final answer.

What I built

I turned the experiment into a free browser-based CPS test. It supports
mouse and keyboard input, starts on the first valid input, and does not
require an account.

You can try the tool here:
Free browser CPS test

What I am still improving

I am still thinking about edge cases such as browser focus, accidental
inputs, and making results easier to compare across test durations.

Building this reminded me that even a tiny browser tool has many small
decisions hiding behind a simple interface.

If you have built browser timing tools before, I would be interested in
how you handle these cases.

Disclosure: I use

Top comments (0)