Skip to content
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

Benchmarking context switching #219

Open
danielecr opened this issue May 4, 2020 · 2 comments
Open

Benchmarking context switching #219

danielecr opened this issue May 4, 2020 · 2 comments

Comments

@danielecr
Copy link
Contributor

This morning I had a discussion about benchmark result.
Some way it come out there is not real use-case for 1000 continuous requests, most of the time an application is doing "somethingelse" between a request (or group of requests), and another.

Of course the tests should be reproducible, and the benchmark well defined, so this "something-else" must be of constant cost, or in a predefined distribution of costs between each request, but not a simple setTimeout(), because it requires no real switch. Actually setTimeout() may causes an OS context switch for multitasking management, that is not exactly desirable for a reproducible test.

Candidates would be a different subsystem of nodejs, or another library to load.

Does it makes sense to add a benchmark like this?

@JCMais
Copy link
Owner

JCMais commented May 4, 2020

Sure, I thought about that but didn't have time to create something related. Feel free to do so.

Some options:

  1. Some loop doing something that blocks the UI
  2. Call some crypto library and have it do some hashing
  3. Something else?

@danielecr
Copy link
Contributor Author

I like option 2. that is more versatile and less invasive. I save a time-slot for tomorrow, I hope to commit something

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants