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

[SPARK-32071][SQL][TESTS] Add make_interval benchmark #28905

Closed
wants to merge 12 commits into from

Conversation

MaxGekk
Copy link
Member

@MaxGekk MaxGekk commented Jun 23, 2020

What changes were proposed in this pull request?

Add benchmarks for interval constructor make_interval and measure perf of 4 cases:

  1. Constant (year, month)
  2. Constant (week, day)
  3. Constant (hour, minute, second, second fraction)
  4. All fields are NOT constant.

The benchmark results are generated in the environment:

Item Description
Region us-west-2 (Oregon)
Instance r3.xlarge
AMI ubuntu/images/hvm-ssd/ubuntu-bionic-18.04-amd64-server-20190722.1 (ami-06f2f779464715dc5)
Java OpenJDK 64-Bit Server VM 1.8.0_252 and OpenJDK 64-Bit Server VM 11.0.7+10

Why are the changes needed?

To have a base line for future perf improvements of make_interval, and to prevent perf regressions in the future.

Does this PR introduce any user-facing change?

No

How was this patch tested?

By running IntervalBenchmark via:

$ SPARK_GENERATE_BENCHMARK_FILES=1 build/sbt "sql/test:runMain org.apache.spark.sql.execution.benchmark.IntervalBenchmark"

make_interval(): Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative
------------------------------------------------------------------------------------------------------------------------
prepare make_interval() 3396 3410 13 0.3 3395.6 1.0X
make_interval(0,1,2,3,4,5,50.123456) 132 141 8 7.6 132.3 25.7X
Copy link
Member Author

@MaxGekk MaxGekk Jun 23, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had to remove spaces otherwise results in the table are shifted so much to the right and not aligned to column names.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR #28906 fixes the issue.

@SparkQA
Copy link

SparkQA commented Jun 23, 2020

Test build #124414 has finished for PR 28905 at commit 6f64bf0.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@MaxGekk
Copy link
Member Author

MaxGekk commented Jun 23, 2020

@cloud-fan @HyukjinKwon @dongjoon-hyun Please, review this PR.

@SparkQA
Copy link

SparkQA commented Jun 23, 2020

Test build #124430 has finished for PR 28905 at commit ec47daf.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@SparkQA
Copy link

SparkQA commented Jun 24, 2020

Test build #124433 has finished for PR 28905 at commit 27c297e.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@cloud-fan
Copy link
Contributor

do we need to regenerate the result as #28906 is merged?

@MaxGekk
Copy link
Member Author

MaxGekk commented Jun 24, 2020

@cloud-fan I will re-generate results tomorrow.

@SparkQA
Copy link

SparkQA commented Jun 25, 2020

Test build #124499 has finished for PR 28905 at commit 3c5b604.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@MaxGekk
Copy link
Member Author

MaxGekk commented Jun 25, 2020

@HyukjinKwon @cloud-fan Please, review this PR.

@dongjoon-hyun dongjoon-hyun changed the title [SPARK-32071][SQL] Benchmark make_interval [SPARK-32071][SQL][TESTS] Benchmark make_interval Jun 28, 2020
@dongjoon-hyun
Copy link
Member

Retest this please.

Copy link
Member

@dongjoon-hyun dongjoon-hyun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1, LGTM. Merged to master.
Thank you, @MaxGekk .

@dongjoon-hyun dongjoon-hyun changed the title [SPARK-32071][SQL][TESTS] Benchmark make_interval [SPARK-32071][SQL][TESTS] Add make_interval benchmark Jun 28, 2020
@SparkQA
Copy link

SparkQA commented Jun 28, 2020

Test build #124579 has finished for PR 28905 at commit 3c5b604.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@MaxGekk MaxGekk deleted the benchmark-make_interval branch December 11, 2020 20:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
4 participants