Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add bench result files.
  • Loading branch information
Marcelo Vanzin committed Oct 24, 2019
commit 9174f52af23b5b8648527ece2c8f7d4e3b470ccc
12 changes: 12 additions & 0 deletions sql/core/benchmarks/MetricsAggregationBenchmark-jdk11-results.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
OpenJDK 64-Bit Server VM 11.0.4+11 on Linux 4.15.0-66-generic
Intel(R) Core(TM) i7-6820HQ CPU @ 2.70GHz
metrics aggregation (50 metrics, 100000 tasks per stage): Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative
------------------------------------------------------------------------------------------------------------------------
1 stage(s) 672 841 179 0.0 671888474.0 1.0X
2 stage(s) 1700 1842 201 0.0 1699591662.0 0.4X
3 stage(s) 2601 2776 247 0.0 2601465786.0 0.3X

Stage Count Stage Proc. Time Aggreg. Time
1 436 164
2 537 354
3 480 602
12 changes: 12 additions & 0 deletions sql/core/benchmarks/MetricsAggregationBenchmark-results.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
Java HotSpot(TM) 64-Bit Server VM 1.8.0_181-b13 on Linux 4.15.0-66-generic
Intel(R) Core(TM) i7-6820HQ CPU @ 2.70GHz
metrics aggregation (50 metrics, 100000 tasks per stage): Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative
------------------------------------------------------------------------------------------------------------------------
1 stage(s) 740 883 147 0.0 740089816.0 1.0X
2 stage(s) 1661 1943 399 0.0 1660649192.0 0.4X
3 stage(s) 2711 2967 362 0.0 2711110178.0 0.3X

Stage Count Stage Proc. Time Aggreg. Time
1 405 179
2 375 414
3 364 644
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,16 @@ import org.apache.spark.status.ElementTrackingStore
import org.apache.spark.util.{AccumulatorMetadata, LongAccumulator, Utils}
import org.apache.spark.util.kvstore.InMemoryStore

/**
* Benchmark for metrics aggregation in the SQL listener.
* {{{
* To run this benchmark:
* 1. without sbt: bin/spark-submit --class <this class> --jars <core test jar>
* 2. build/sbt "core/test:runMain <this class>"
* 3. generate result: SPARK_GENERATE_BENCHMARK_FILES=1 build/sbt "core/test:runMain <this class>"
* Results will be written to "benchmarks/MetricsAggregationBenchmark-results.txt".
* }}}
*/
object MetricsAggregationBenchmark extends BenchmarkBase {

private def metricTrackingBenchmark(
Expand Down Expand Up @@ -161,13 +171,12 @@ object MetricsAggregationBenchmark extends BenchmarkBase {

val benchmark = new Benchmark(
s"metrics aggregation ($metricCount metrics, $taskCount tasks per stage)", 1,
warmupTime = 0.seconds)
warmupTime = 0.seconds, output = output)

// Run this outside the measurement code so that classes are loaded and JIT is triggered,
// otherwise the first run tends to be much slower than others. Also because this benchmark is a
// bit weird and doesn't really map to what the Benchmark class expects, so it's a bit harder
// to use warmupTime and friends effectively.
benchmark.out.printf("Warming up...\n")
stageCounts.foreach { count =>
metricTrackingBenchmark(new Benchmark.Timer(-1), metricCount, taskCount, count)
}
Expand Down