2.4. Benchmark Driver

    Download presto-benchmark-driver-0.234-executable.jar, rename it to ,then make it executable with chmod +x.

    Create a suite.json file:

    The SQL files are contained in a directory named sql and must have the.sql file extension. The name of the query is the name of the filewithout the extension.

    The benchmark driver will measure the wall time, total CPU time used byall Presto processes and the CPU time used by the query. For each timing, thedriver reports median, mean and standard deviation of the query runs. Thedifference between process and query CPU times is the query overhead, whichis normally from garbage collections. The following is the output from thefile_formats suite above:

    The driver can add additional columns to the output by extracting values fromthe schema name or SQL files. In the suite file above, the schema namescontain named regular expression capturing groups for ,format, and scale, so if we ran the queries in a catalog containing theschemas tpch_sf100_orc_none, tpch_sf100_orc_snappy, andtpch_sf100_orc_zlib, we get the above output.

    Another way to create additional output columns is by adding tags to theSQL files. For example, the following SQL file declares two tags,projection and filter:

    The program contains many CLI arguments to controlwhich suites and queries to run, the number of warm-up runs and the numberof measurement runs. All of the command line arguments can be seen with the—help option.