add v2 benchmark#175
Merged
Merged
Conversation
Scaffolds four JVM-only subprojects under benchmark/ to visualize the performance characteristics of v1.10.0 (Maven artifact, com.github.doyaaaaaken.*) against v2.0.0 (this branch, com.jsoizo.*) on identical workloads. Subprojects: - benchmark/shared: deterministic data generation (CsvDataGen / DatasetSpec / DataStats) and environment probe. Depends only on kotlin-stdlib so it stays out of every benchmark classpath as a library. - benchmark/v1: JMH source set whose only kotlin-csv on classpath is com.jsoizo:kotlin-csv-jvm:1.10.0. Covers readAll(String/InputStream/File), iterative Sequence over File, readAllWithHeader, writeAll(OutputStream/File). - benchmark/v2: JMH source set whose only kotlin-csv on classpath is the current project. Mirrors the v1 workloads on the v2 API and adds V2BackendBenchmarks comparing java.io vs kotlinx-io paths. - benchmark/parity: JUnit subproject that intentionally puts both v1 and v2 on the test classpath (FQCNs do not collide) and asserts row-by-row equality on the HARD dataset for readAll/readAllWithHeader/writeAll. Classpath isolation is achieved by separating v1 and v2 into different Gradle resolution scopes; this stops Gradle from collapsing kotlinx-coroutines (and other transitive deps) to a single version across the two artifacts. Resolved jmhRuntimeClasspath was verified to contain v1 only on the v1 side and the v2 project only on the v2 side. JMH defaults: warmup=5, iterations=5, fork=2, modes=throughput+avgt, jvmArgs=[-Xms2g,-Xmx2g], JDK 21 toolchain. -Pbench.profile=large|gcprof| stackprof overrides the defaults for the long-running LARGE dataset and profiler runs. -Pjmh.include / -Pjmh.warmupIterations / -Pjmh.iterations / -Pjmh.fork allow per-invocation overrides for smoke runs.
Sets warmup=3, iter=3, fork=1, time=5s and restricts dataset @Param to SMALL and HARD via JMH '-p dataset' equivalent. Intended for the first issue #172 comment so readers see numbers before the full primary run finishes.
The MapProperty<String, ListProperty<String>> setter does not accept a plain List<String>. Wrap the value in objects.listProperty(...).set(...).
Restricts dataset @Param to SMALL/MEDIUM/HARD; the LARGE dataset is covered by the separate 'large' profile per the methodology in #172.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## version_2_0_0 #175 +/- ##
==============================================
Coverage 94.77% 94.77%
==============================================
Files 22 22
Lines 421 421
Branches 95 95
==============================================
Hits 399 399
Misses 14 14
Partials 8 8 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.