From fb7b87021437c52d72ad276f92c8d6f5443ebd78 Mon Sep 17 00:00:00 2001 From: Liang-Chi Hsieh Date: Wed, 25 Nov 2020 15:22:47 -0800 Subject: [PATCH] [SPARK-33523][SQL][TEST][FOLLOWUP] Fix benchmark case name in SubExprEliminationBenchmark ### What changes were proposed in this pull request? Fix the wrong benchmark case name. ### Why are the changes needed? The last commit to refactor the benchmark code missed a change of case name. ### Does this PR introduce _any_ user-facing change? No, dev only. ### How was this patch tested? Unit test. Closes #30505 from viirya/SPARK-33523-followup. Authored-by: Liang-Chi Hsieh Signed-off-by: Dongjoon Hyun --- ...SubExprEliminationBenchmark-jdk11-results.txt | 16 ++++++++-------- .../SubExprEliminationBenchmark-results.txt | 16 ++++++++-------- .../execution/SubExprEliminationBenchmark.scala | 2 +- 3 files changed, 17 insertions(+), 17 deletions(-) diff --git a/sql/core/benchmarks/SubExprEliminationBenchmark-jdk11-results.txt b/sql/core/benchmarks/SubExprEliminationBenchmark-jdk11-results.txt index a7f0acc3cdc86..5eeb485a921b8 100644 --- a/sql/core/benchmarks/SubExprEliminationBenchmark-jdk11-results.txt +++ b/sql/core/benchmarks/SubExprEliminationBenchmark-jdk11-results.txt @@ -7,19 +7,19 @@ OpenJDK 64-Bit Server VM 11.0.9+11 on Mac OS X 10.15.6 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz from_json as subExpr in Project: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -subExprElimination false, codegen: true 24827 25398 562 0.0 248271027.2 1.0X -subExprElimination false, codegen: false 25052 25704 625 0.0 250518603.6 1.0X -subExprElimination true, codegen: true 1540 1606 92 0.0 15403083.7 16.1X -subExprElimination true, codegen: false 1487 1535 53 0.0 14865051.6 16.7X +subExprElimination false, codegen: true 22482 23194 652 0.0 224817884.1 1.0X +subExprElimination false, codegen: false 22544 22658 155 0.0 225436869.9 1.0X +subExprElimination true, codegen: true 1371 1403 34 0.0 13710714.3 16.4X +subExprElimination true, codegen: false 1295 1317 20 0.0 12949824.3 17.4X Preparing data for benchmarking ... OpenJDK 64-Bit Server VM 11.0.9+11 on Mac OS X 10.15.6 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz from_json as subExpr in Filter: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -subexpressionElimination off, codegen on 37327 38261 809 0.0 373266387.0 1.0X -subexpressionElimination off, codegen on 36126 37445 1575 0.0 361263987.0 1.0X -subexpressionElimination off, codegen on 20152 21596 1263 0.0 201522903.8 1.9X -subexpressionElimination off, codegen on 20799 20940 233 0.0 207993923.0 1.8X +subExprElimination false, codegen: true 34976 35331 326 0.0 349759975.5 1.0X +subExprElimination false, codegen: false 34101 34802 607 0.0 341014685.7 1.0X +subExprElimination true, codegen: true 19440 19622 272 0.0 194402251.0 1.8X +subExprElimination true, codegen: false 19247 20064 719 0.0 192466667.6 1.8X diff --git a/sql/core/benchmarks/SubExprEliminationBenchmark-results.txt b/sql/core/benchmarks/SubExprEliminationBenchmark-results.txt index e5f1bc14243e0..49a107f542857 100644 --- a/sql/core/benchmarks/SubExprEliminationBenchmark-results.txt +++ b/sql/core/benchmarks/SubExprEliminationBenchmark-results.txt @@ -7,19 +7,19 @@ OpenJDK 64-Bit Server VM 1.8.0_265-b01 on Mac OS X 10.15.6 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz from_json as subExpr in Project: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -subExprElimination false, codegen: true 23094 23763 585 0.0 230939301.2 1.0X -subExprElimination false, codegen: false 23161 24087 844 0.0 231611379.8 1.0X -subExprElimination true, codegen: true 1492 1517 30 0.0 14921022.9 15.5X -subExprElimination true, codegen: false 1300 1361 93 0.0 12996167.7 17.8X +subExprElimination false, codegen: true 25399 25869 466 0.0 253992369.6 1.0X +subExprElimination false, codegen: false 24086 25094 888 0.0 240858699.5 1.1X +subExprElimination true, codegen: true 1527 1600 64 0.0 15274388.8 16.6X +subExprElimination true, codegen: false 1560 1600 52 0.0 15597825.4 16.3X Preparing data for benchmarking ... OpenJDK 64-Bit Server VM 1.8.0_265-b01 on Mac OS X 10.15.6 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz from_json as subExpr in Filter: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -subexpressionElimination off, codegen on 37069 37767 985 0.0 370694301.5 1.0X -subexpressionElimination off, codegen on 37095 37970 1008 0.0 370945081.6 1.0X -subexpressionElimination off, codegen on 20618 21443 715 0.0 206175173.8 1.8X -subexpressionElimination off, codegen on 21563 21887 307 0.0 215626274.7 1.7X +subExprElimination false, codegen: true 39661 40585 844 0.0 396612867.5 1.0X +subExprElimination false, codegen: false 40633 48813 1858 0.0 406328241.3 1.0X +subExprElimination true, codegen: true 25819 27096 1174 0.0 258194064.4 1.5X +subExprElimination true, codegen: false 23467 25137 1447 0.0 234668398.2 1.7X diff --git a/sql/core/src/test/scala/org/apache/spark/sql/execution/SubExprEliminationBenchmark.scala b/sql/core/src/test/scala/org/apache/spark/sql/execution/SubExprEliminationBenchmark.scala index e26acbcb3cd21..0ed0126add7a2 100644 --- a/sql/core/src/test/scala/org/apache/spark/sql/execution/SubExprEliminationBenchmark.scala +++ b/sql/core/src/test/scala/org/apache/spark/sql/execution/SubExprEliminationBenchmark.scala @@ -100,7 +100,7 @@ object SubExprEliminationBenchmark extends SqlBasedBenchmark { // We only benchmark subexpression performance under codegen/non-codegen, so disabling // json optimization. val caseName = s"subExprElimination $subExprEliminationEnabled, codegen: $codegenEnabled" - benchmark.addCase("subexpressionElimination off, codegen on", numIters) { _ => + benchmark.addCase(caseName, numIters) { _ => withSQLConf( SQLConf.SUBEXPRESSION_ELIMINATION_ENABLED.key -> subExprEliminationEnabled, SQLConf.WHOLESTAGE_CODEGEN_ENABLED.key -> codegenEnabled,