-
Notifications
You must be signed in to change notification settings - Fork 4
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 performance comparison to snakeyaml-engine #217
Add performance comparison to snakeyaml-engine #217
Conversation
@State(Scope.Benchmark) | ||
@BenchmarkMode(Mode.AverageTime) | ||
@OutputTimeUnit(BenchmarkTimeUnit.MILLISECONDS) | ||
class SnakeyamlEngineJvmLoadingTimeBenchmark { |
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.
It should be displayed as a separate series on the JVM graph in https://krzema12.github.io/snakeyaml-engine-kmp-benchmarks/dev/bench/
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.
Yes, it will be. Each benchmark is displayed as a separate chart by default (you can modify the index.html in gh-pages branch if you need otherwise)
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.
you can modify the index.html in gh-pages branch if you need otherwise
I tried tinkering with JavaScript to have both JVM series on a single graph, but I lost the battle 😅 Maybe another time! This is the feature request on the GitHub action's side: benchmark-action/github-action-benchmark#175
|
||
@Benchmark | ||
fun loadsOpenAiSchema(): Map<*, *> { | ||
return with(fileSystem()) { |
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.
question: why don't use just a standard java input stream instead of okio source which later converted to a stream? It is more fair in my opinion
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 wanted to keep the setup code as close to the KMP test as possible, to keep the overhead roughly the same to be able to compare both. But thanks for this comment, I'll give it more thought!
This way we should have a reference point to the implementation where SnakeYAML Engine KMP was forked from.