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

[Question] Any idea to support multi threaded routine call for throughput test? #752

Open
ileixe opened this issue Jan 19, 2024 · 1 comment

Comments

@ileixe
Copy link

ileixe commented Jan 19, 2024

I'm looking for basic and simple throughput test (stress or loadgen) solution which measure goodput and badput. Currently criterion.rs provides simple throughput metrics which single threaded one but what I want multi-threaded form with more complex workloads user can define.

I searched several rust projects and they have somehow similar approach to measure throughput, to generate "workload" from multi threaded on their own (own main function without harness) or more wider form of test theory like goose. Both approaches looks fine but have some limitations (e.g. Goose looks targeting loadgen for "very specific" workload like HTTP) I think it's very helpful if criterion.rs provides basic API for such scenario.

From implementation perspective, now I can use iter_custom() at least as I can define any function, but want to hear better idea.

Any idea would be appreciated.

@ileixe ileixe changed the title [Question] Any idea to support multi threaded routine call? [Question] Any idea to support multi threaded routine call for throughput test? Jan 19, 2024
@Pr0methean
Copy link

Pr0methean commented Jan 20, 2024

A way to accomplish this would be if we could specify how to calculate throughput at the end of a batch of iterations, since then the threads that weren't being directly benchmarked could increment an AtomicU64 each time they finished a work unit. Then we'd call swap(0, SeqCst) on that counter at the end of the batch, and store(0, SeqCst) once we'd joined all those threads.

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

No branches or pull requests

2 participants