-
Notifications
You must be signed in to change notification settings - Fork 772
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 type matching benchmark #768
Add type matching benchmark #768
Conversation
benchmark/benchmark.gradle
Outdated
@@ -22,10 +25,16 @@ jmh { | |||
fork = 1 // How many times to forks a single benchmark. Use 0 to disable forking altogether | |||
// jvmArgs += ["-XX:+UnlockDiagnosticVMOptions", "-XX:+DebugNonSafepoints", "-XX:StartFlightRecording=delay=5s,dumponexit=true,name=jmh-benchmark,filename=$rootDir/benchmark/build/reports/jmh/jmh-benchmark.jfr"] | |||
// jvmArgs += ["-agentpath:$rootDir/benchmark/src/jmh/resources/libasyncProfiler.so=start,collapsed,file=$rootDir/benchmark/build/reports/jmh/profiler.txt"] | |||
failOnError = true // Should JMH fail immediately if any benchmark had experienced the unrecoverable error? | |||
|
|||
// uncomment to use for TypeMatchingBenchmark |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it worth having a separate Gradle project?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or separate Gradle task
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just tried this, but the jmh task seems different from normal gradle tasks(?): https://github.com/melix/jmh-gradle-plugin/blob/master/src/main/groovy/me/champeau/gradle/JMHTask.java#L32
and so I run into this problem:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for now, I modeled it similar to existing benchmarks, and I added #782
benchmark/benchmark.gradle
Outdated
@@ -22,10 +25,16 @@ jmh { | |||
fork = 1 // How many times to forks a single benchmark. Use 0 to disable forking altogether | |||
// jvmArgs += ["-XX:+UnlockDiagnosticVMOptions", "-XX:+DebugNonSafepoints", "-XX:StartFlightRecording=delay=5s,dumponexit=true,name=jmh-benchmark,filename=$rootDir/benchmark/build/reports/jmh/jmh-benchmark.jfr"] | |||
// jvmArgs += ["-agentpath:$rootDir/benchmark/src/jmh/resources/libasyncProfiler.so=start,collapsed,file=$rootDir/benchmark/build/reports/jmh/profiler.txt"] | |||
failOnError = true // Should JMH fail immediately if any benchmark had experienced the unrecoverable error? | |||
|
|||
// uncomment to use for TypeMatchingBenchmark |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or separate Gradle task
benchmark/src/jmh/java/io/opentelemetry/benchmark/TypeMatchingBenchmark.java
Outdated
Show resolved
Hide resolved
@trask do you want to address my comments and will merge? |
Yes, I do want to address your comments, they are good, just haven't got to it yet |
I added this to benchmark the change discussed in #646 (comment), and the benchmark seems useful to keep around (and probably improve).