Skip to content

timers "depth" benchmark usefulness #9493

Closed
@Trott

Description

@Trott
  • Version: v8.0.0-pre
  • Platform: all
  • Subsystem: benchmark, timers

The depth benchmark for timers sets a timer that sets a timer that sets a timer that... 500K of them.

Since each timer has to wait for the next tick of the event loop:

  • This benchmark takes a very long time to run compared to the breadth test that is already in the file.
  • This may be more of an event loop benchmark than a timer benchmark.

I wonder if it makes sense to do any of the following or something similar:

  • Reduce the number of iterations for the depth test as it's really just running the iterations in sequence, not in parallel. And even on an infinitely fast machine, it would take over 8 minutes to run because each tick of the event loop would have to wait 1ms before firing the timer.

  • Move and/or rename the depth benchmark as it is unlikely to be something significantly impacted by changes in the Node.js timers code.

I know I can send command line arguments to skip the depth test or change the value of N. I just suspect that the default behavior right now isn't ideal. Every time I touch timers code and run a benchmark, this is an annoyance.

Metadata

Metadata

Assignees

Labels

benchmarkIssues and PRs related to the benchmark subsystem.timersIssues and PRs related to the timers subsystem / setImmediate, setInterval, setTimeout.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions