lampepfl / gears

A strawman for a low-level async library in Scala 3.
https://lampepfl.github.io/gears/
Apache License 2.0
256 stars 26 forks source link

Add a stress test that spawns 1M tasks #106

Open lilac opened 1 week ago

lilac commented 1 week ago

The test is inspired by the C10k problem, a common challenge in web development.

To simulate 1M request, we use a "task per request" model, so 1M tasks are created. Each task consists of

  1. Async IO workload such as remote RPC. Here it's simulated by a sleep.
  2. CPU intensive computation. Here it is simulated with a double calculation.