{ "cells": [ { "metadata": { "collapsed": true }, "cell_type": "markdown", "source": [ "# Simple Benchmark Analysis\n", "This notebook demonstrates how you can analyze and plot benchmark results from a single benchmark run.\n", "Several projects exist in the `examples` folder, but this notebook assumes we are working on the\n", "JVM part of the `kotlin-multiplatform` project. But the same approach can be used for the other projects.\n", "\n", "First, you need to run the benchmark. This can be done by running this command from the root of the project:\n", "\n", "```shell\n", "./gradlew :examples:kotlin-multiplatform:jvmBenchmark\n", "```\n", "\n", "Once it is completed, run this notebook, and it will automatically find the latest result." ] }, { "metadata": { "executionRelatedData": { "compiledClasses": [ "Line_3_jupyter", "Line_4_jupyter", "Line_5_jupyter", "Line_6_jupyter", "Line_7_jupyter", "Line_8_jupyter", "Line_9_jupyter", "Line_10_jupyter", "Line_11_jupyter", "Line_12_jupyter", "Line_13_jupyter", "Line_14_jupyter", "Line_15_jupyter", "Line_16_jupyter" ] }, "ExecuteTime": { "end_time": "2025-11-12T22:48:39.666949Z", "start_time": "2025-11-12T22:48:35.274977Z" } }, "cell_type": "code", "source": "%use serialization, dataframe, kandy", "outputs": [], "execution_count": 1 }, { "metadata": { "executionRelatedData": { "compiledClasses": [ "Line_17_jupyter" ] }, "ExecuteTime": { "end_time": "2025-11-12T22:48:40.134692Z", "start_time": "2025-11-12T22:48:39.676285Z" } }, "cell_type": "code", "source": [ "// Serialization classes matching the JMH-alike JSON format.\n", "// We define these classes manually so we can keep `params` as a JsonObject, as it means we can handle them\n", "// in a generic manner. If you benchmark have fixed params, using `\"\".deserializeThis()` is\n", "// faster and easier.\n", "\n", "@Serializable\n", "public data class Benchmark(\n", " public val benchmark: String,\n", " public val mode: String,\n", " public val forks: Int = 1,\n", " public val warmupIterations: Int,\n", " public val warmupTime: String,\n", " public val measurementIterations: Int,\n", " public val measurementTime: String,\n", " public val primaryMetric: PrimaryMetric,\n", " public val secondaryMetrics: Map,\n", " public val params: JsonObject? = null\n", ")\n", "\n", "@Serializable\n", "public data class PrimaryMetric(\n", " public val score: Double,\n", " public val scoreError: Double,\n", " public val scoreConfidence: List,\n", " public val scorePercentiles: Map,\n", " public val scoreUnit: String,\n", " public val rawData: List>,\n", ")" ], "outputs": [], "execution_count": 2 }, { "metadata": { "executionRelatedData": { "compiledClasses": [ "Line_18_jupyter" ] }, "ExecuteTime": { "end_time": "2025-11-12T22:48:40.498796Z", "start_time": "2025-11-12T22:48:40.140479Z" } }, "cell_type": "code", "source": [ "import java.nio.file.Files\n", "import java.nio.file.attribute.BasicFileAttributes\n", "import kotlin.io.path.exists\n", "import kotlin.io.path.forEachDirectoryEntry\n", "import kotlin.io.path.isDirectory\n", "import kotlin.io.path.listDirectoryEntries\n", "import kotlin.io.path.readText\n", "\n", "// Find latest result file, based on the their timestamp.\n", "val runsDir = notebook.workingDir.resolve(\"kotlin-multiplatform/build/reports/benchmarks/main\")\n", "val lastRunDir = runsDir.listDirectoryEntries()\n", " .filter { it.isDirectory() }\n", " .sortedByDescending { dir -> Files.readAttributes(dir, BasicFileAttributes::class.java).creationTime() }\n", " .first()\n", "val outputFile = lastRunDir.resolve(\"jvm.json\")\n", "val json = Json { ignoreUnknownKeys = true }\n", "val benchmarkData = json.decodeFromString>(outputFile.readText())" ], "outputs": [], "execution_count": 3 }, { "metadata": { "executionRelatedData": { "compiledClasses": [ "Line_19_jupyter" ] }, "ExecuteTime": { "end_time": "2025-11-12T22:48:40.759773Z", "start_time": "2025-11-12T22:48:40.509312Z" } }, "cell_type": "code", "source": [ "import kotlinx.serialization.json.encodeToJsonElement\n", "\n", "// Helper class for tracking the information we need to use.\n", "data class Benchmark(val name: String, val params: String, val score: Double, val error: Double, val unit: String)\n", "\n", "// Split benchmark results into groups. Generally, each group consist of all tests from one test file,\n", "// except when it is an parameterized test. In this case, each test (with all its variants) are put\n", "// in its own group.\n", "val benchmarkGroups = benchmarkData\n", " .groupBy {\n", " if (it.params != null) {\n", " it.benchmark\n", " } else {\n", " it.benchmark.substringBeforeLast(\".\")\n", " }\n", " }\n", " .mapValues { group ->\n", " val benchmarks = group.value.map { benchmark ->\n", " val paramInfo = benchmark.params?.entries.orEmpty()\n", " .sortedBy { it.key }\n", " .joinToString(\",\") { \"${it.key}=${it.value.jsonPrimitive.content}\" }\n", " val name = benchmark.benchmark\n", " Benchmark(\n", " name,\n", " paramInfo,\n", " benchmark.primaryMetric.score,\n", " benchmark.primaryMetric.scoreError,\n", " benchmark.primaryMetric.scoreUnit\n", " )\n", " }\n", " benchmarks.toDataFrame()\n", " }\n", "\n", "// Un-commont this to see the benchmark data as DataFrames\n", "// benchmarkGroups.forEach {\n", "// DISPLAY(it.value)\n", "// }" ], "outputs": [], "execution_count": 4 }, { "metadata": { "executionRelatedData": { "compiledClasses": [ "Line_20_jupyter" ] }, "ExecuteTime": { "end_time": "2025-11-12T22:48:40.943415Z", "start_time": "2025-11-12T22:48:40.765765Z" } }, "cell_type": "code", "source": [ "// Prepare the data frames for plotting by:\n", "// - Add calculated columns for errorMin / errorMax\n", "// - Tests with parameters use the parameter values as the label\n", "// - Tests without paramaters use the test name as the label\n", "val plotData = benchmarkGroups.mapValues {\n", " it.value\n", " .add(\"errorMin\") { it.getValue(\"score\") - it.getValue(\"error\") }\n", " .add(\"errorMax\") { it.getValue(\"score\") + it.getValue(\"error\") }\n", " .insert(\"label\") {\n", " // Re-format the benchmark labels to make them look \"nicer\"\n", " if (!it.getValue(\"params\").isBlank()) {\n", " it.getValue(\"params\").replace(\",\", \"\\n\")\n", " } else {\n", " it.getValue(\"name\").substringAfterLast(\".\").removeSuffix(\"Benchmark\")\n", " }\n", " }.at(0)\n", " .remove(\"name\", \"params\")\n", "}" ], "outputs": [], "execution_count": 5 }, { "metadata": { "executionRelatedData": { "compiledClasses": [ "Line_21_jupyter" ] }, "ExecuteTime": { "end_time": "2025-11-12T22:48:41.489622Z", "start_time": "2025-11-12T22:48:40.953044Z" } }, "cell_type": "code", "source": [ "import org.jetbrains.letsPlot.Geom\n", "import org.jetbrains.letsPlot.core.spec.plotson.coord\n", "import org.jetbrains.letsPlot.themes.margin\n", "\n", "// Plot each group as a bar plot with the error displayed as error bars.\n", "// This approach assumes that each group has tests roughly within the same \"scale\".\n", "// If this is not the case, some plots might look very squished. If this happens,\n", "// you can play around with using a LOG10 scale or modifying the limits to focus\n", "// on the changes.\n", "plotData.forEach { (fileName, dataframe) ->\n", " val plot = dataframe.plot {\n", " bars {\n", " x(\"label\") {\n", " axis.name = \"\"\n", " }\n", " y(\"score\")\n", " }\n", " errorBars {\n", " x(\"label\")\n", " y(\"score\")\n", " yMin(\"errorMin\")\n", " yMax(\"errorMax\")\n", " }\n", " coordinatesTransformation = CoordinatesTransformation.cartesianFlipped()\n", " // y.axis.limits = dataframe.min(\"errorMin\")..dataframe.max(\"errorMax\")\n", " layout {\n", " this.yAxisLabel = dataframe.first().getValue(\"unit\")\n", " style {\n", " global {\n", " title {\n", " margin(10.0, 0.0)\n", " }\n", " text {\n", " fontFamily = FontFamily.MONO\n", " }\n", " }\n", " }\n", " // Adjust the height of the Kandy plot based on the number of tests.\n", " size = 800 to ((50 * dataframe.size().nrow) + 100)\n", " }\n", " }\n", " DISPLAY(HTML(\"

$fileName

\"))\n", " DISPLAY(plot)\n", "}" ], "outputs": [ { "data": { "text/html": [ "

test.InheritedBenchmark

" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " 0\n", " \n", " \n", " \n", " \n", " \n", " \n", " 20M\n", " \n", " \n", " \n", " \n", " \n", " \n", " 40M\n", " \n", " \n", " \n", " \n", " \n", " \n", " 60M\n", " \n", " \n", " \n", " \n", " \n", " \n", " 80M\n", " \n", " \n", " \n", " \n", " \n", " \n", " 100M\n", " \n", " \n", " \n", " \n", " \n", " \n", " 120M\n", " \n", " \n", " \n", " \n", " \n", " \n", " 140M\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " base\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " inherited\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " ops/s\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "\n", " " ], "application/plot+json": { "output_type": "lets_plot_spec", "output": { "mapping": {}, "guides": { "y": { "title": "ops/s" } }, "coord": { "name": "flip", "flip": true }, "data": { "score": [ 999715.5730582711, 1.3251985400275281E8 ], "errorMax": [ 1024476.8651513313, 1.3567233458470887E8 ], "label": [ "base", "inherited" ], "errorMin": [ 974954.2809652109, 1.2936737342079675E8 ] }, "ggsize": { "width": 800.0, "height": 200.0 }, "kind": "plot", "scales": [ { "aesthetic": "y", "limits": [ null, null ] }, { "aesthetic": "x", "discrete": true, "name": "" }, { "aesthetic": "y", "limits": [ null, null ] }, { "aesthetic": "x", "discrete": true } ], "layers": [ { "mapping": { "y": "score", "x": "label" }, "stat": "identity", "sampling": "none", "inherit_aes": false, "position": "dodge", "geom": "bar" }, { "mapping": { "y": "score", "x": "label", "ymin": "errorMin", "ymax": "errorMax" }, "stat": "identity", "sampling": "none", "inherit_aes": false, "position": "dodge", "geom": "errorbar" } ], "theme": { "text": { "family": "mono", "blank": false }, "title": { "margin": [ 10.0, 0.0, 10.0, 0.0 ], "blank": false }, "axis_ontop": false, "axis_ontop_y": false, "axis_ontop_x": false }, "data_meta": { "series_annotations": [ { "type": "str", "column": "label" }, { "type": "float", "column": "score" }, { "type": "float", "column": "errorMin" }, { "type": "float", "column": "errorMax" } ] } }, "apply_color_scheme": true, "swing_enabled": true } }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "

test.ParamBenchmark.mathBenchmark

" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " 0\n", " \n", " \n", " \n", " \n", " \n", " \n", " 50,000\n", " \n", " \n", " \n", " \n", " \n", " \n", " 100,000\n", " \n", " \n", " \n", " \n", " \n", " \n", " 150,000\n", " \n", " \n", " \n", " \n", " \n", " \n", " 200,000\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " data=1 text=a "string" with quotes value=1\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " data=1 text=a "string" with quotes value=2\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " data=2 text=a "string" with quotes value=1\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " data=2 text=a "string" with quotes value=2\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " ops/ms\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "\n", " " ], "application/plot+json": { "output_type": "lets_plot_spec", "output": { "mapping": {}, "guides": { "y": { "title": "ops/ms" } }, "coord": { "name": "flip", "flip": true }, "data": { "score": [ 196902.03613375648, 198982.020454078, 76487.5086281744, 77218.5368951281 ], "errorMax": [ 202149.32994077116, 203466.72113419612, 78379.96894260854, 78837.91006301393 ], "label": [ "data=1\ntext=a \"string\" with quotes\nvalue=1", "data=1\ntext=a \"string\" with quotes\nvalue=2", "data=2\ntext=a \"string\" with quotes\nvalue=1", "data=2\ntext=a \"string\" with quotes\nvalue=2" ], "errorMin": [ 191654.7423267418, 194497.3197739599, 74595.04831374026, 75599.16372724227 ] }, "ggsize": { "width": 800.0, "height": 300.0 }, "kind": "plot", "scales": [ { "aesthetic": "y", "limits": [ null, null ] }, { "aesthetic": "x", "discrete": true, "name": "" }, { "aesthetic": "y", "limits": [ null, null ] }, { "aesthetic": "x", "discrete": true } ], "layers": [ { "mapping": { "y": "score", "x": "label" }, "stat": "identity", "sampling": "none", "inherit_aes": false, "position": "dodge", "geom": "bar" }, { "mapping": { "y": "score", "x": "label", "ymin": "errorMin", "ymax": "errorMax" }, "stat": "identity", "sampling": "none", "inherit_aes": false, "position": "dodge", "geom": "errorbar" } ], "theme": { "text": { "family": "mono", "blank": false }, "title": { "margin": [ 10.0, 0.0, 10.0, 0.0 ], "blank": false }, "axis_ontop": false, "axis_ontop_y": false, "axis_ontop_x": false }, "data_meta": { "series_annotations": [ { "type": "str", "column": "label" }, { "type": "float", "column": "score" }, { "type": "float", "column": "errorMin" }, { "type": "float", "column": "errorMax" } ] } }, "apply_color_scheme": true, "swing_enabled": true } }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "

test.ParamBenchmark.otherBenchmark

" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " 0\n", " \n", " \n", " \n", " \n", " \n", " \n", " 500,000\n", " \n", " \n", " \n", " \n", " \n", " \n", " 1,000,000\n", " \n", " \n", " \n", " \n", " \n", " \n", " 1,500,000\n", " \n", " \n", " \n", " \n", " \n", " \n", " 2,000,000\n", " \n", " \n", " \n", " \n", " \n", " \n", " 2,500,000\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " data=1 text=a "string" with quotes value=1\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " data=1 text=a "string" with quotes value=2\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " data=2 text=a "string" with quotes value=1\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " data=2 text=a "string" with quotes value=2\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " ops/ms\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "\n", " " ], "application/plot+json": { "output_type": "lets_plot_spec", "output": { "mapping": {}, "guides": { "y": { "title": "ops/ms" } }, "coord": { "name": "flip", "flip": true }, "data": { "score": [ 2312642.7736440543, 2295922.9388216315, 2295223.3640071456, 2295128.5932107824 ], "errorMax": [ 2533506.1085633924, 2501910.6409945134, 2474678.1337146433, 2507812.186162458 ], "label": [ "data=1\ntext=a \"string\" with quotes\nvalue=1", "data=1\ntext=a \"string\" with quotes\nvalue=2", "data=2\ntext=a \"string\" with quotes\nvalue=1", "data=2\ntext=a \"string\" with quotes\nvalue=2" ], "errorMin": [ 2091779.438724716, 2089935.2366487498, 2115768.594299648, 2082445.0002591067 ] }, "ggsize": { "width": 800.0, "height": 300.0 }, "kind": "plot", "scales": [ { "aesthetic": "y", "limits": [ null, null ] }, { "aesthetic": "x", "discrete": true, "name": "" }, { "aesthetic": "y", "limits": [ null, null ] }, { "aesthetic": "x", "discrete": true } ], "layers": [ { "mapping": { "y": "score", "x": "label" }, "stat": "identity", "sampling": "none", "inherit_aes": false, "position": "dodge", "geom": "bar" }, { "mapping": { "y": "score", "x": "label", "ymin": "errorMin", "ymax": "errorMax" }, "stat": "identity", "sampling": "none", "inherit_aes": false, "position": "dodge", "geom": "errorbar" } ], "theme": { "text": { "family": "mono", "blank": false }, "title": { "margin": [ 10.0, 0.0, 10.0, 0.0 ], "blank": false }, "axis_ontop": false, "axis_ontop_y": false, "axis_ontop_x": false }, "data_meta": { "series_annotations": [ { "type": "str", "column": "label" }, { "type": "float", "column": "score" }, { "type": "float", "column": "errorMin" }, { "type": "float", "column": "errorMax" } ] } }, "apply_color_scheme": true, "swing_enabled": true } }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "

test.ParamBenchmark.textContentCheck

" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " 0\n", " \n", " \n", " \n", " \n", " \n", " \n", " 20,000\n", " \n", " \n", " \n", " \n", " \n", " \n", " 40,000\n", " \n", " \n", " \n", " \n", " \n", " \n", " 60,000\n", " \n", " \n", " \n", " \n", " \n", " \n", " 80,000\n", " \n", " \n", " \n", " \n", " \n", " \n", " 100,000\n", " \n", " \n", " \n", " \n", " \n", " \n", " 120,000\n", " \n", " \n", " \n", " \n", " \n", " \n", " 140,000\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " data=1 text=a "string" with quotes value=1\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " data=1 text=a "string" with quotes value=2\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " data=2 text=a "string" with quotes value=1\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " data=2 text=a "string" with quotes value=2\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " ops/ms\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "\n", " " ], "application/plot+json": { "output_type": "lets_plot_spec", "output": { "mapping": {}, "guides": { "y": { "title": "ops/ms" } }, "coord": { "name": "flip", "flip": true }, "data": { "score": [ 139497.9818106305, 139472.55121529553, 137951.95168809665, 135829.98563075942 ], "errorMax": [ 143101.02418653402, 143695.13204299458, 142114.53374258292, 140469.26639132493 ], "label": [ "data=1\ntext=a \"string\" with quotes\nvalue=1", "data=1\ntext=a \"string\" with quotes\nvalue=2", "data=2\ntext=a \"string\" with quotes\nvalue=1", "data=2\ntext=a \"string\" with quotes\nvalue=2" ], "errorMin": [ 135894.93943472698, 135249.9703875965, 133789.3696336104, 131190.7048701939 ] }, "ggsize": { "width": 800.0, "height": 300.0 }, "kind": "plot", "scales": [ { "aesthetic": "y", "limits": [ null, null ] }, { "aesthetic": "x", "discrete": true, "name": "" }, { "aesthetic": "y", "limits": [ null, null ] }, { "aesthetic": "x", "discrete": true } ], "layers": [ { "mapping": { "y": "score", "x": "label" }, "stat": "identity", "sampling": "none", "inherit_aes": false, "position": "dodge", "geom": "bar" }, { "mapping": { "y": "score", "x": "label", "ymin": "errorMin", "ymax": "errorMax" }, "stat": "identity", "sampling": "none", "inherit_aes": false, "position": "dodge", "geom": "errorbar" } ], "theme": { "text": { "family": "mono", "blank": false }, "title": { "margin": [ 10.0, 0.0, 10.0, 0.0 ], "blank": false }, "axis_ontop": false, "axis_ontop_y": false, "axis_ontop_x": false }, "data_meta": { "series_annotations": [ { "type": "str", "column": "label" }, { "type": "float", "column": "score" }, { "type": "float", "column": "errorMin" }, { "type": "float", "column": "errorMax" } ] } }, "apply_color_scheme": true, "swing_enabled": true } }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "

test.nested.CommonBenchmark

" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " 0\n", " \n", " \n", " \n", " \n", " \n", " \n", " 20,000\n", " \n", " \n", " \n", " \n", " \n", " \n", " 40,000\n", " \n", " \n", " \n", " \n", " \n", " \n", " 60,000\n", " \n", " \n", " \n", " \n", " \n", " \n", " 80,000\n", " \n", " \n", " \n", " \n", " \n", " \n", " 100,000\n", " \n", " \n", " \n", " \n", " \n", " \n", " 120,000\n", " \n", " \n", " \n", " \n", " \n", " \n", " 140,000\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " math\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " ops/ms\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "\n", " " ], "application/plot+json": { "output_type": "lets_plot_spec", "output": { "mapping": {}, "guides": { "y": { "title": "ops/ms" } }, "coord": { "name": "flip", "flip": true }, "data": { "score": [ 133932.19330461326 ], "errorMax": [ 137986.16262644873 ], "label": [ "math" ], "errorMin": [ 129878.2239827778 ] }, "ggsize": { "width": 800.0, "height": 150.0 }, "kind": "plot", "scales": [ { "aesthetic": "y", "limits": [ null, null ] }, { "aesthetic": "x", "discrete": true, "name": "" }, { "aesthetic": "y", "limits": [ null, null ] }, { "aesthetic": "x", "discrete": true } ], "layers": [ { "mapping": { "y": "score", "x": "label" }, "stat": "identity", "sampling": "none", "inherit_aes": false, "position": "dodge", "geom": "bar" }, { "mapping": { "y": "score", "x": "label", "ymin": "errorMin", "ymax": "errorMax" }, "stat": "identity", "sampling": "none", "inherit_aes": false, "position": "dodge", "geom": "errorbar" } ], "theme": { "text": { "family": "mono", "blank": false }, "title": { "margin": [ 10.0, 0.0, 10.0, 0.0 ], "blank": false }, "axis_ontop": false, "axis_ontop_y": false, "axis_ontop_x": false }, "data_meta": { "series_annotations": [ { "type": "str", "column": "label" }, { "type": "float", "column": "score" }, { "type": "float", "column": "errorMin" }, { "type": "float", "column": "errorMax" } ] } }, "apply_color_scheme": true, "swing_enabled": true } }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "

test.CommonBenchmark

" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " 0.0000\n", " \n", " \n", " \n", " \n", " \n", " \n", " 0.0001\n", " \n", " \n", " \n", " \n", " \n", " \n", " 0.0002\n", " \n", " \n", " \n", " \n", " \n", " \n", " 0.0003\n", " \n", " \n", " \n", " \n", " \n", " \n", " 0.0004\n", " \n", " \n", " \n", " \n", " \n", " \n", " 0.0005\n", " \n", " \n", " \n", " \n", " \n", " \n", " 0.0006\n", " \n", " \n", " \n", " \n", " \n", " \n", " 0.0007\n", " \n", " \n", " \n", " \n", " \n", " \n", " 0.0008\n", " \n", " \n", " \n", " \n", " \n", " \n", " 0.0009\n", " \n", " \n", " \n", " \n", " \n", " \n", " 0.0010\n", " \n", " \n", " \n", " \n", " \n", " \n", " 0.0011\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " long\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " longBlackhole\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " math\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " ms/op\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "\n", " " ], "application/plot+json": { "output_type": "lets_plot_spec", "output": { "mapping": {}, "guides": { "y": { "title": "ms/op" } }, "coord": { "name": "flip", "flip": true }, "data": { "score": [ 0.0010203532398568873, 2.6287927694751805E-5, 7.614962302484078E-6 ], "errorMax": [ 0.0010504284290899577, 2.6979490207589775E-5, 7.77349973367662E-6 ], "label": [ "long", "longBlackhole", "math" ], "errorMin": [ 9.902780506238168E-4, 2.5596365181913836E-5, 7.456424871291536E-6 ] }, "ggsize": { "width": 800.0, "height": 250.0 }, "kind": "plot", "scales": [ { "aesthetic": "y", "limits": [ null, null ] }, { "aesthetic": "x", "discrete": true, "name": "" }, { "aesthetic": "y", "limits": [ null, null ] }, { "aesthetic": "x", "discrete": true } ], "layers": [ { "mapping": { "y": "score", "x": "label" }, "stat": "identity", "sampling": "none", "inherit_aes": false, "position": "dodge", "geom": "bar" }, { "mapping": { "y": "score", "x": "label", "ymin": "errorMin", "ymax": "errorMax" }, "stat": "identity", "sampling": "none", "inherit_aes": false, "position": "dodge", "geom": "errorbar" } ], "theme": { "text": { "family": "mono", "blank": false }, "title": { "margin": [ 10.0, 0.0, 10.0, 0.0 ], "blank": false }, "axis_ontop": false, "axis_ontop_y": false, "axis_ontop_x": false }, "data_meta": { "series_annotations": [ { "type": "str", "column": "label" }, { "type": "float", "column": "score" }, { "type": "float", "column": "errorMin" }, { "type": "float", "column": "errorMax" } ] } }, "apply_color_scheme": true, "swing_enabled": true } }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "

test.JvmTestBenchmark

" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " 0.0\n", " \n", " \n", " \n", " \n", " \n", " \n", " 0.5\n", " \n", " \n", " \n", " \n", " \n", " \n", " 1.0\n", " \n", " \n", " \n", " \n", " \n", " \n", " 1.5\n", " \n", " \n", " \n", " \n", " \n", " \n", " 2.0\n", " \n", " \n", " \n", " \n", " \n", " \n", " 2.5\n", " \n", " \n", " \n", " \n", " \n", " \n", " 3.0\n", " \n", " \n", " \n", " \n", " \n", " \n", " 3.5\n", " \n", " \n", " \n", " \n", " \n", " \n", " 4.0\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " cos\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " sqrt\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " ns/op\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "\n", " " ], "application/plot+json": { "output_type": "lets_plot_spec", "output": { "mapping": {}, "guides": { "y": { "title": "ns/op" } }, "coord": { "name": "flip", "flip": true }, "data": { "score": [ 3.9713384641892873, 0.6065983726836912 ], "errorMax": [ 4.1068243414082675, 0.62305902250719 ], "label": [ "cos", "sqrt" ], "errorMin": [ 3.8358525869703075, 0.5901377228601924 ] }, "ggsize": { "width": 800.0, "height": 200.0 }, "kind": "plot", "scales": [ { "aesthetic": "y", "limits": [ null, null ] }, { "aesthetic": "x", "discrete": true, "name": "" }, { "aesthetic": "y", "limits": [ null, null ] }, { "aesthetic": "x", "discrete": true } ], "layers": [ { "mapping": { "y": "score", "x": "label" }, "stat": "identity", "sampling": "none", "inherit_aes": false, "position": "dodge", "geom": "bar" }, { "mapping": { "y": "score", "x": "label", "ymin": "errorMin", "ymax": "errorMax" }, "stat": "identity", "sampling": "none", "inherit_aes": false, "position": "dodge", "geom": "errorbar" } ], "theme": { "text": { "family": "mono", "blank": false }, "title": { "margin": [ 10.0, 0.0, 10.0, 0.0 ], "blank": false }, "axis_ontop": false, "axis_ontop_y": false, "axis_ontop_x": false }, "data_meta": { "series_annotations": [ { "type": "str", "column": "label" }, { "type": "float", "column": "score" }, { "type": "float", "column": "errorMin" }, { "type": "float", "column": "errorMax" } ] } }, "apply_color_scheme": true, "swing_enabled": true } }, "metadata": {}, "output_type": "display_data" } ], "execution_count": 6 } ], "metadata": { "kernelspec": { "display_name": "Kotlin", "language": "kotlin", "name": "kotlin" }, "language_info": { "name": "kotlin", "version": "2.2.20", "mimetype": "text/x-kotlin", "file_extension": ".kt", "pygments_lexer": "kotlin", "codemirror_mode": "text/x-kotlin", "nbconvert_exporter": "" } }, "nbformat": 4, "nbformat_minor": 0 }