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 performance comparison to snakeyaml-engine #217

Merged
merged 2 commits into from
Jul 27, 2024

Conversation

krzema12
Copy link
Owner

@krzema12 krzema12 commented Jul 27, 2024

This way we should have a reference point to the implementation where SnakeYAML Engine KMP was forked from.

@krzema12 krzema12 marked this pull request as ready for review July 27, 2024 19:07
@State(Scope.Benchmark)
@BenchmarkMode(Mode.AverageTime)
@OutputTimeUnit(BenchmarkTimeUnit.MILLISECONDS)
class SnakeyamlEngineJvmLoadingTimeBenchmark {
Copy link
Owner Author

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/

Copy link
Collaborator

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)

Copy link
Owner Author

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()) {
Copy link
Collaborator

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

Copy link
Owner Author

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!

OptimumCode
OptimumCode previously approved these changes Jul 27, 2024
@krzema12 krzema12 merged commit c2dd42a into main Jul 27, 2024
8 checks passed
@krzema12 krzema12 deleted the add-performance-comparison-to-snakeyaml-engine branch July 27, 2024 21:09
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

Successfully merging this pull request may close these issues.

2 participants