SlideShare a Scribd company logo
Testing tools
Wojciech.Biela@teradata.com
Łukasz.Osipiuk@teradata.com
Karol.Sobczak@teradata.com
Why we need them
● Certified distro
● Enterprise support
● Quarterly releases
● Product testing - Tempto
● Performance testing - Benchto
Tempto
Product test framework
github.com/prestodb/tempto
Łukasz Osipiuk
lukasz.osipiuk@teradata.com
What is Tempto?
● End-to-end product testing framework
● Targeted to software engineers
● For automation
● Tests easy to define
● Focus on test code
● Focus on database systems
● So far used for testing
○ Presto
○ internal projects
How is test defined?
● Java
● SQL convention based
Example – Java based test
public class SimpleQueryTest extends ProductTest {
private static class SimpleTestRequirements implements RequirementsProvider{
public Requirement getRequirements(Configuration config) {
return new ImmutableHiveTableRequirement(NATION);
}
}
@Inject
Configuration configuration;
@Test(groups = {"smoke", "query"})
@Requires(SimpleTestRequirements.class)
public void selectCountFromNation()
{
assertThat(query("select count(*) from nation"))
.hasRowsCount(1)
.hasRows(row(25));
}
}
Example – Convention based test
allRows.sql:
-- database: hive; tables: blah
SELECT * FROM sample_table
allRows.result:
-- delimiter: |; ignoreOrder: false; types: BIGINT,VARCHAR
1|A|
2|B|
3|C|
Tempto architecture
user provided
library provided
TestNG
TestNG
listeners
utils
tests
requirements requirement
fulfillers
Tempto architecture
● Works well
● Extensible
● Well knownTestNG
TestNG
listeners
utils
tests
requirements requirement
fulfillers
Tempto architecture
● Tempto specific extension of TestNG
execution framework
● Requirements management
● Tests filtering
● Injecting dependencies
● Extended logging
TestNG
utils
tests
requirements requirement
fulfillers
TestNG
listeners
Tempto architecture
● Test code :)
○ Java
○ SQL-convention basedTestNG
utils
requirements requirement
fulfillers
TestNG
listeners
tests
Tempto architecture
● Declarative requirements
● Fulfilled by test framework via
pluggable fulfillers
● e.g. mutableTable(
Tpch.NATION,
LOADED,
“hive”)
● Test level and suite level
● Cleanup
TestNG
utils
TestNG
listeners
tests
requirements requirement
fulfillers
Tempto architecture
● extra assertions
● various tools
○ HDFS client
○ SSH client
○ JDBC query executor
TestNG
TestNG
listeners
tests
requirements requirement
fulfillers
utils
Executable runner
java -jar target/presto-product-tests-0.120-SNAPSHOT-executable.jar --help
usage: Presto product tests
--config-local <arg> URI to Test local configuration YAML file.
--report-dir <arg> Test reports directory
--groups <arg> Test groups to be run
--excluded-groups <arg> Test groups to be excluded
--tests <arg> Test patterns to be included
-h,--help Shows help message
● All dependencies embedded
● User provides cluster details through yaml config.
Configuration
hdfs:
username: hdfs
webhdfs:
host: master
port: 50070
tests:
hdfs:
path: /product-test
databases:
default:
alias: presto
hive:
jdbc_driver_class: org.apache.hive.jdbc.HiveDriver
jdbc_url: jdbc:hive2://master:10000
jdbc_user: hdfs
jdbc_password: na
jdbc_pooling: false
jdbc_jar: test-framework-hive-jdbc-all.jar
presto:
jdbc_driver_class: com.facebook.presto.jdbc.PrestoDriver
jdbc_url: jdbc:presto://localhost:8080/hive/default
jdbc_user: hdfs
jdbc_password: na
jdbc_pooling: false
Benchto
macro benchmarking framework
github.com/teradata/benchto (very soon)
Karol Sobczak
karol.sobczak@teradata.com
Goals
● Easy and manageable way to define benchmarks
● Run and analyze macro benchmarks in clustered environment
● Repeatable benchmarking of Hadoop SQL engines, most importantly Presto
○ also used for Hive, Teradata components
● Transparent, trusted framework for benchmarking
Presto Testing Tools: Benchto & Tempto (Presto Boston Meetup 10062015)
Presto Testing Tools: Benchto & Tempto (Presto Boston Meetup 10062015)
Presto Testing Tools: Benchto & Tempto (Presto Boston Meetup 10062015)
Presto Testing Tools: Benchto & Tempto (Presto Boston Meetup 10062015)
Benchmarks - model
BenchmarkRun QueryExecution
Measurement
Aggregated
Measurement
Measurement
n n
1
n
1
n
Benchmarks - execution
before-benchmark-macros
prewarm
benchmark
.
.
execution-0
execution-1
execution-n
after-benchmark-macros
Benchmarks - execution
before-benchmark-macros
prewarm
benchmark
.
.
execution-0
execution-1
execution-n
after-benchmark-macros
Benchmarks - execution
before-benchmark-macros
prewarm
benchmark
.
.
execution-0
execution-1
execution-n
after-benchmark-macros
Benchmarks - execution
before-benchmark-macros
prewarm
benchmark
.
.
execution-0
execution-1
execution-n
after-benchmark-macros
Defining benchmarks - structure
● Convention based defining of benchmark through descriptors (YAML format)
and query SQL files
$ tree .
.
├── application-presto-devenv.yaml
├── application-td-hdp.yaml
├── benchmarks
│ ├── presto
│ │ ├── concurrency-insert-multi-table.yaml
│ │ ├── concurrency.yaml
│ │ ├── linear-scan.yaml
│ │ ├── tpch.yaml
│ │ └── types.yaml
│ └── querygrid-presto-ansi
│ └── concurrency.yaml
└── sql
├── presto
│ ├── dev-zero
│ │ ├── create-alltypes.sql
│ │ └── create-lineitem.sql
│ ├── linear-scan
│ │ ├── selectivity-0.sql
│ │ ├── selectivity-100.sql
...
Defining benchmarks - descriptor
● Descriptor is YAML configuration file with various properties and user defined
variables
$ cat benchmarks/presto/concurrency.yaml
datasource: presto
query-names: presto/linear-scan/selectivity-${selectivity}.sql
schema: tpch_100gb_orc
database: hive
concurrency: ${concurrency_level}
runs: ${concurrency_level}
prewarm-runs: 3
before-benchmark: drop-caches
variables:
1:
selectivity: 10, 100
concurrency_level: 10
2:
selectivity: 10, 100
concurrency_level: 20
3:
selectivity: 10, 100
concurrency_level: 50
Defining benchmarks – SQL file templating
● SQL files can use keys defined in YAML configuration file – templates are
based on FreeMarker
$ cat sql/presto/tpch/q14.sql
SELECT 100.00 * sum(CASE
WHEN p.type LIKE 'PROMO%'
THEN l.extendedprice * (1 - l.discount)
ELSE 0
END) / sum(l.extendedprice * (1 - l.discount)) AS promo_revenue
FROM
"${database}"."${schema}"."lineitem" AS l,
"${database}"."${schema}"."part" AS p
WHERE
l.partkey = p.partkey
AND l.shipdate >= DATE '1995-09-01'
AND l.shipdate < DATE '1995-09-01' + INTERVAL '1' MONTH
Future work
● (Tempto) Support for complex concurrent tests execution
● (Benchto) Automatic regression detection
● (Benchto) Customized dashboards (e.g. overall performance analysis)
● (Benchto) Hardware and configuration awarness
● (Benchto) More complex benchmarking scenarios
● (Benchto) Support for complex concurrency scenarios
● (Benchto) Scheduling mechanism
Questions?
Benchto GUI
● Visualization of benchmarks results
● Linking between tools (Grafana, Presto UI)
● Comparison of multiple benchmarks
Grafana monitoring
● We use Grafana dashboard with Graphite
● Benchmark/executions life-cycle events are showed on dashboards
● Provides good visibility into state of the cluster

More Related Content

PPTX
MySQL InnoDB Cluster 미리보기 (remote cluster test)
PPTX
Windows と標準的なハードウェアで構築するストレージ サーバー
DOCX
Add row in asp.net Gridview on button click using C# and vb.net
PPTX
Go言語のフレームワークRevelの紹介とサービスにおける活用事例
PDF
Understanding Android Benchmarks
PDF
ProxySQL and the Tricks Up Its Sleeve - Percona Live 2022.pdf
PDF
Linux에서 Secondary VNIC와 Secondary Private IP 추가 방법
PDF
Instalasi Linux CentOS 7 pada VMWare Workstation 14
MySQL InnoDB Cluster 미리보기 (remote cluster test)
Windows と標準的なハードウェアで構築するストレージ サーバー
Add row in asp.net Gridview on button click using C# and vb.net
Go言語のフレームワークRevelの紹介とサービスにおける活用事例
Understanding Android Benchmarks
ProxySQL and the Tricks Up Its Sleeve - Percona Live 2022.pdf
Linux에서 Secondary VNIC와 Secondary Private IP 추가 방법
Instalasi Linux CentOS 7 pada VMWare Workstation 14

What's hot (20)

DOC
Router commands
PDF
the-pfsense-documentation.pdf
PDF
Query Optimization with MySQL 5.6: Old and New Tricks - Percona Live London 2013
PDF
Vlan configuration guide
PPTX
Full Page Writes in PostgreSQL PGCONFEU 2022
PPT
Core Java Slides
PDF
Kernel Recipes 2019 - Faster IO through io_uring
PDF
Vim Hacks
PDF
5 Steps to PostgreSQL Performance
PPT
Spring Core
DOC
Backup of quick basic
PDF
Ciso commands
PDF
Cisco ASA Firewall Lab WorkBook
PDF
Sql query patterns, optimized
PDF
Synchronise your data between MySQL and MongoDB
PPTX
Spring transaction management
PDF
Windows에서 Secondary VNIC와 Secondary Private IP 추가 방법
PPTX
Redis and it's data types
PDF
DataOpsbarcelona 2019: Deep dive into MySQL Group Replication... the magic e...
PDF
Refactoring: A First Example - Martin Fowler’s First Example of Refactoring, ...
Router commands
the-pfsense-documentation.pdf
Query Optimization with MySQL 5.6: Old and New Tricks - Percona Live London 2013
Vlan configuration guide
Full Page Writes in PostgreSQL PGCONFEU 2022
Core Java Slides
Kernel Recipes 2019 - Faster IO through io_uring
Vim Hacks
5 Steps to PostgreSQL Performance
Spring Core
Backup of quick basic
Ciso commands
Cisco ASA Firewall Lab WorkBook
Sql query patterns, optimized
Synchronise your data between MySQL and MongoDB
Spring transaction management
Windows에서 Secondary VNIC와 Secondary Private IP 추가 방법
Redis and it's data types
DataOpsbarcelona 2019: Deep dive into MySQL Group Replication... the magic e...
Refactoring: A First Example - Martin Fowler’s First Example of Refactoring, ...
Ad

Viewers also liked (20)

PPTX
Hello, Enterprise! Meet Presto. (Presto Boston Meetup 10062015)
PDF
Presto at Facebook - Presto Meetup @ Boston (10/6/2015)
PDF
Presto as a Service - Tips for operation and monitoring
PDF
Understanding Presto - Presto meetup @ Tokyo #1
PDF
Presto @ Treasure Data - Presto Meetup Boston 2015
PPTX
Presto for the Enterprise @ Hadoop Meetup
PDF
Presto Meetup @ Facebook (3/22/2016)
PDF
AWS Meet-up: Logging At Scale on AWS
PDF
Prestogres internals
PPTX
Future of Data Meetup : Boontadata
PPTX
Hadoop World 2011: Big Data Architecture: Integrating Hadoop with Other Enter...
PDF
Big Data: SQL query federation for Hadoop and RDBMS data
PDF
Scylla Summit 2016: Analytics Show Time - Spark and Presto Powered by Scylla
PPTX
Hybrid Data Architecture: Integrating Hadoop with a Data Warehouse
PPTX
Amazon EMR Facebook Presto Meetup
PDF
Presto - SQL on anything
PPTX
Presto: Distributed sql query engine
PPTX
Teradata Big Data London Seminar
PDF
Big SQL Competitive Summary - Vendor Landscape
PDF
The Value of the Modern Data Architecture with Apache Hadoop and Teradata
Hello, Enterprise! Meet Presto. (Presto Boston Meetup 10062015)
Presto at Facebook - Presto Meetup @ Boston (10/6/2015)
Presto as a Service - Tips for operation and monitoring
Understanding Presto - Presto meetup @ Tokyo #1
Presto @ Treasure Data - Presto Meetup Boston 2015
Presto for the Enterprise @ Hadoop Meetup
Presto Meetup @ Facebook (3/22/2016)
AWS Meet-up: Logging At Scale on AWS
Prestogres internals
Future of Data Meetup : Boontadata
Hadoop World 2011: Big Data Architecture: Integrating Hadoop with Other Enter...
Big Data: SQL query federation for Hadoop and RDBMS data
Scylla Summit 2016: Analytics Show Time - Spark and Presto Powered by Scylla
Hybrid Data Architecture: Integrating Hadoop with a Data Warehouse
Amazon EMR Facebook Presto Meetup
Presto - SQL on anything
Presto: Distributed sql query engine
Teradata Big Data London Seminar
Big SQL Competitive Summary - Vendor Landscape
The Value of the Modern Data Architecture with Apache Hadoop and Teradata
Ad

Similar to Presto Testing Tools: Benchto & Tempto (Presto Boston Meetup 10062015) (20)

PDF
POUG2019 - Test your PL/SQL - your database will love you
PDF
Introduction to clarity
PDF
Core Java Programming Language (JSE) : Chapter X - I/O Fundamentals
PDF
Bgoug 2019.11 test your pl sql - not your patience
PPTX
Integration Group - Robot Framework
PPT
SQLMAP Tool Usage - A Heads Up
PDF
Q4.11: Getting Started in LAVA
PDF
dokumen.tips_rediscovering-spring-with-spring-boot1 (1).pdf
PDF
dokumen.tips_rediscovering-spring-with-spring-boot1.pdf
PDF
Rediscovering Spring with Spring Boot(1)
PPTX
airflowpresentation1-180717183432.pptx
PPTX
Rally - Benchmarking_as_a_service - Openstack meetup
PPTX
Openstack Rally - Benchmark as a Service. Openstack Meetup India. Ananth/Rahul.
PDF
Performance Testing - Apache Benchmark, JMeter
PPTX
apache_jmeter.pptx
PPTX
Practical Glusto Example
PDF
Big Data Analytics using Mahout
PDF
PDF
Custom deployments with sbt-native-packager
PDF
CMake Tutorial
POUG2019 - Test your PL/SQL - your database will love you
Introduction to clarity
Core Java Programming Language (JSE) : Chapter X - I/O Fundamentals
Bgoug 2019.11 test your pl sql - not your patience
Integration Group - Robot Framework
SQLMAP Tool Usage - A Heads Up
Q4.11: Getting Started in LAVA
dokumen.tips_rediscovering-spring-with-spring-boot1 (1).pdf
dokumen.tips_rediscovering-spring-with-spring-boot1.pdf
Rediscovering Spring with Spring Boot(1)
airflowpresentation1-180717183432.pptx
Rally - Benchmarking_as_a_service - Openstack meetup
Openstack Rally - Benchmark as a Service. Openstack Meetup India. Ananth/Rahul.
Performance Testing - Apache Benchmark, JMeter
apache_jmeter.pptx
Practical Glusto Example
Big Data Analytics using Mahout
Custom deployments with sbt-native-packager
CMake Tutorial

Recently uploaded (20)

PPTX
cloud_computing_Infrastucture_as_cloud_p
PDF
gpt5_lecture_notes_comprehensive_20250812015547.pdf
PDF
DP Operators-handbook-extract for the Mautical Institute
PDF
Enhancing emotion recognition model for a student engagement use case through...
PDF
Hindi spoken digit analysis for native and non-native speakers
PDF
Transform Your ITIL® 4 & ITSM Strategy with AI in 2025.pdf
PDF
NewMind AI Weekly Chronicles – August ’25 Week III
PDF
TrustArc Webinar - Click, Consent, Trust: Winning the Privacy Game
PPTX
The various Industrial Revolutions .pptx
PDF
Univ-Connecticut-ChatGPT-Presentaion.pdf
PDF
2021 HotChips TSMC Packaging Technologies for Chiplets and 3D_0819 publish_pu...
PDF
Web App vs Mobile App What Should You Build First.pdf
PDF
DASA ADMISSION 2024_FirstRound_FirstRank_LastRank.pdf
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PDF
project resource management chapter-09.pdf
PPTX
TLE Review Electricity (Electricity).pptx
PDF
Developing a website for English-speaking practice to English as a foreign la...
PDF
Hybrid model detection and classification of lung cancer
PPTX
Group 1 Presentation -Planning and Decision Making .pptx
PPTX
Final SEM Unit 1 for mit wpu at pune .pptx
cloud_computing_Infrastucture_as_cloud_p
gpt5_lecture_notes_comprehensive_20250812015547.pdf
DP Operators-handbook-extract for the Mautical Institute
Enhancing emotion recognition model for a student engagement use case through...
Hindi spoken digit analysis for native and non-native speakers
Transform Your ITIL® 4 & ITSM Strategy with AI in 2025.pdf
NewMind AI Weekly Chronicles – August ’25 Week III
TrustArc Webinar - Click, Consent, Trust: Winning the Privacy Game
The various Industrial Revolutions .pptx
Univ-Connecticut-ChatGPT-Presentaion.pdf
2021 HotChips TSMC Packaging Technologies for Chiplets and 3D_0819 publish_pu...
Web App vs Mobile App What Should You Build First.pdf
DASA ADMISSION 2024_FirstRound_FirstRank_LastRank.pdf
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
project resource management chapter-09.pdf
TLE Review Electricity (Electricity).pptx
Developing a website for English-speaking practice to English as a foreign la...
Hybrid model detection and classification of lung cancer
Group 1 Presentation -Planning and Decision Making .pptx
Final SEM Unit 1 for mit wpu at pune .pptx

Presto Testing Tools: Benchto & Tempto (Presto Boston Meetup 10062015)

  • 2. Why we need them ● Certified distro ● Enterprise support ● Quarterly releases ● Product testing - Tempto ● Performance testing - Benchto
  • 4. What is Tempto? ● End-to-end product testing framework ● Targeted to software engineers ● For automation ● Tests easy to define ● Focus on test code ● Focus on database systems ● So far used for testing ○ Presto ○ internal projects
  • 5. How is test defined? ● Java ● SQL convention based
  • 6. Example – Java based test public class SimpleQueryTest extends ProductTest { private static class SimpleTestRequirements implements RequirementsProvider{ public Requirement getRequirements(Configuration config) { return new ImmutableHiveTableRequirement(NATION); } } @Inject Configuration configuration; @Test(groups = {"smoke", "query"}) @Requires(SimpleTestRequirements.class) public void selectCountFromNation() { assertThat(query("select count(*) from nation")) .hasRowsCount(1) .hasRows(row(25)); } }
  • 7. Example – Convention based test allRows.sql: -- database: hive; tables: blah SELECT * FROM sample_table allRows.result: -- delimiter: |; ignoreOrder: false; types: BIGINT,VARCHAR 1|A| 2|B| 3|C|
  • 8. Tempto architecture user provided library provided TestNG TestNG listeners utils tests requirements requirement fulfillers
  • 9. Tempto architecture ● Works well ● Extensible ● Well knownTestNG TestNG listeners utils tests requirements requirement fulfillers
  • 10. Tempto architecture ● Tempto specific extension of TestNG execution framework ● Requirements management ● Tests filtering ● Injecting dependencies ● Extended logging TestNG utils tests requirements requirement fulfillers TestNG listeners
  • 11. Tempto architecture ● Test code :) ○ Java ○ SQL-convention basedTestNG utils requirements requirement fulfillers TestNG listeners tests
  • 12. Tempto architecture ● Declarative requirements ● Fulfilled by test framework via pluggable fulfillers ● e.g. mutableTable( Tpch.NATION, LOADED, “hive”) ● Test level and suite level ● Cleanup TestNG utils TestNG listeners tests requirements requirement fulfillers
  • 13. Tempto architecture ● extra assertions ● various tools ○ HDFS client ○ SSH client ○ JDBC query executor TestNG TestNG listeners tests requirements requirement fulfillers utils
  • 14. Executable runner java -jar target/presto-product-tests-0.120-SNAPSHOT-executable.jar --help usage: Presto product tests --config-local <arg> URI to Test local configuration YAML file. --report-dir <arg> Test reports directory --groups <arg> Test groups to be run --excluded-groups <arg> Test groups to be excluded --tests <arg> Test patterns to be included -h,--help Shows help message ● All dependencies embedded ● User provides cluster details through yaml config.
  • 15. Configuration hdfs: username: hdfs webhdfs: host: master port: 50070 tests: hdfs: path: /product-test databases: default: alias: presto hive: jdbc_driver_class: org.apache.hive.jdbc.HiveDriver jdbc_url: jdbc:hive2://master:10000 jdbc_user: hdfs jdbc_password: na jdbc_pooling: false jdbc_jar: test-framework-hive-jdbc-all.jar presto: jdbc_driver_class: com.facebook.presto.jdbc.PrestoDriver jdbc_url: jdbc:presto://localhost:8080/hive/default jdbc_user: hdfs jdbc_password: na jdbc_pooling: false
  • 16. Benchto macro benchmarking framework github.com/teradata/benchto (very soon) Karol Sobczak karol.sobczak@teradata.com
  • 17. Goals ● Easy and manageable way to define benchmarks ● Run and analyze macro benchmarks in clustered environment ● Repeatable benchmarking of Hadoop SQL engines, most importantly Presto ○ also used for Hive, Teradata components ● Transparent, trusted framework for benchmarking
  • 22. Benchmarks - model BenchmarkRun QueryExecution Measurement Aggregated Measurement Measurement n n 1 n 1 n
  • 27. Defining benchmarks - structure ● Convention based defining of benchmark through descriptors (YAML format) and query SQL files $ tree . . ├── application-presto-devenv.yaml ├── application-td-hdp.yaml ├── benchmarks │ ├── presto │ │ ├── concurrency-insert-multi-table.yaml │ │ ├── concurrency.yaml │ │ ├── linear-scan.yaml │ │ ├── tpch.yaml │ │ └── types.yaml │ └── querygrid-presto-ansi │ └── concurrency.yaml └── sql ├── presto │ ├── dev-zero │ │ ├── create-alltypes.sql │ │ └── create-lineitem.sql │ ├── linear-scan │ │ ├── selectivity-0.sql │ │ ├── selectivity-100.sql ...
  • 28. Defining benchmarks - descriptor ● Descriptor is YAML configuration file with various properties and user defined variables $ cat benchmarks/presto/concurrency.yaml datasource: presto query-names: presto/linear-scan/selectivity-${selectivity}.sql schema: tpch_100gb_orc database: hive concurrency: ${concurrency_level} runs: ${concurrency_level} prewarm-runs: 3 before-benchmark: drop-caches variables: 1: selectivity: 10, 100 concurrency_level: 10 2: selectivity: 10, 100 concurrency_level: 20 3: selectivity: 10, 100 concurrency_level: 50
  • 29. Defining benchmarks – SQL file templating ● SQL files can use keys defined in YAML configuration file – templates are based on FreeMarker $ cat sql/presto/tpch/q14.sql SELECT 100.00 * sum(CASE WHEN p.type LIKE 'PROMO%' THEN l.extendedprice * (1 - l.discount) ELSE 0 END) / sum(l.extendedprice * (1 - l.discount)) AS promo_revenue FROM "${database}"."${schema}"."lineitem" AS l, "${database}"."${schema}"."part" AS p WHERE l.partkey = p.partkey AND l.shipdate >= DATE '1995-09-01' AND l.shipdate < DATE '1995-09-01' + INTERVAL '1' MONTH
  • 30. Future work ● (Tempto) Support for complex concurrent tests execution ● (Benchto) Automatic regression detection ● (Benchto) Customized dashboards (e.g. overall performance analysis) ● (Benchto) Hardware and configuration awarness ● (Benchto) More complex benchmarking scenarios ● (Benchto) Support for complex concurrency scenarios ● (Benchto) Scheduling mechanism
  • 32. Benchto GUI ● Visualization of benchmarks results ● Linking between tools (Grafana, Presto UI) ● Comparison of multiple benchmarks
  • 33. Grafana monitoring ● We use Grafana dashboard with Graphite ● Benchmark/executions life-cycle events are showed on dashboards ● Provides good visibility into state of the cluster