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

Add benchmark tests for machine creation latency #105

Open
jonessha opened this issue Jun 6, 2023 · 4 comments
Open

Add benchmark tests for machine creation latency #105

jonessha opened this issue Jun 6, 2023 · 4 comments
Labels
enhancement New feature or request

Comments

@jonessha
Copy link
Contributor

jonessha commented Jun 6, 2023

What is your idea?

Add benchmark tests for machine creation latency

Would you be willing to make the change?

Maybe

Additional context

#104

@timbray
Copy link
Collaborator

timbray commented Jun 7, 2023

Benchmarks.java already has a few benchmarks that pound away at addRule() - they measure various things, might be good enough to add latency measurement to an existing one.

@baldawar
Copy link
Collaborator

baldawar commented Jun 7, 2023

Thanks. Found this

public void ruleMemoryBenchmark() throws Exception {

Its just missing couple of lines to track total-time or number of machines built per sec.

@timbray
Copy link
Collaborator

timbray commented Jun 7, 2023

Those benchmarks are generally lousy for their declared purpose, back when I was doing that there was really no good way to track Java memory usage and relate it to code. Maybe the tooling is better now? But yeah, might give useful latency numbers.

@baldawar
Copy link
Collaborator

baldawar commented Jun 8, 2023

JMH is the standard solution though we need to break apart the benchmark into smaller files with tests. Last time I gave it a try, the numbers were had more than 5% of variance compared to our current tests. Not sure if that's just a quirk of benchmarks tests or because of the changes we've made. I don't think there's any big changes coming up soon, so I might give adding JMH again a try once I've wrapped up the first draft for epml-spec/draft-ietf-patterns-protocol#1

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

No branches or pull requests

3 participants