should be it
This commit is contained in:
41
external/duckdb/test/sql/detailed_profiler/detailed_tpch_parallel_sf01.test_slow
vendored
Normal file
41
external/duckdb/test/sql/detailed_profiler/detailed_tpch_parallel_sf01.test_slow
vendored
Normal file
@@ -0,0 +1,41 @@
|
||||
# name: test/sql/detailed_profiler/detailed_tpch_parallel_sf01.test_slow
|
||||
# description: Test Detailed Profiler for parallel TPC-H SF0.1
|
||||
# group: [detailed_profiler]
|
||||
|
||||
require tpch
|
||||
|
||||
statement ok
|
||||
PRAGMA enable_profiling
|
||||
|
||||
statement ok
|
||||
PRAGMA profiling_output='__TEST_DIR__/test.json'
|
||||
|
||||
statement ok
|
||||
PRAGMA profiling_mode = detailed
|
||||
|
||||
statement ok
|
||||
PRAGMA threads=4
|
||||
|
||||
statement ok
|
||||
PRAGMA verify_parallelism
|
||||
|
||||
statement ok
|
||||
CALL dbgen(sf=0.1);
|
||||
|
||||
loop i 1 9
|
||||
|
||||
query I
|
||||
PRAGMA tpch(${i})
|
||||
----
|
||||
<FILE>:extension/tpch/dbgen/answers/sf0.1/q0${i}.csv
|
||||
|
||||
endloop
|
||||
|
||||
loop i 10 23
|
||||
|
||||
query I
|
||||
PRAGMA tpch(${i})
|
||||
----
|
||||
<FILE>:extension/tpch/dbgen/answers/sf0.1/q${i}.csv
|
||||
|
||||
endloop
|
||||
35
external/duckdb/test/sql/detailed_profiler/detailed_tpch_sf001.test_slow
vendored
Normal file
35
external/duckdb/test/sql/detailed_profiler/detailed_tpch_sf001.test_slow
vendored
Normal file
@@ -0,0 +1,35 @@
|
||||
# name: test/sql/detailed_profiler/detailed_tpch_sf001.test_slow
|
||||
# description: est Detailed Profiler for TPC-H SF0.1
|
||||
# group: [detailed_profiler]
|
||||
|
||||
require tpch
|
||||
|
||||
statement ok
|
||||
PRAGMA enable_profiling
|
||||
|
||||
statement ok
|
||||
PRAGMA profiling_output='__TEST_DIR__/test.json'
|
||||
|
||||
statement ok
|
||||
PRAGMA profiling_mode = detailed
|
||||
|
||||
statement ok
|
||||
CALL dbgen(sf=0.01);
|
||||
|
||||
loop i 1 9
|
||||
|
||||
query I
|
||||
PRAGMA tpch(${i})
|
||||
----
|
||||
<FILE>:extension/tpch/dbgen/answers/sf0.01/q0${i}.csv
|
||||
|
||||
endloop
|
||||
|
||||
loop i 10 23
|
||||
|
||||
query I
|
||||
PRAGMA tpch(${i})
|
||||
----
|
||||
<FILE>:extension/tpch/dbgen/answers/sf0.01/q${i}.csv
|
||||
|
||||
endloop
|
||||
47
external/duckdb/test/sql/detailed_profiler/test_detailed_profiler.test
vendored
Normal file
47
external/duckdb/test/sql/detailed_profiler/test_detailed_profiler.test
vendored
Normal file
@@ -0,0 +1,47 @@
|
||||
# name: test/sql/detailed_profiler/test_detailed_profiler.test
|
||||
# description: Detailed Profiler
|
||||
# group: [detailed_profiler]
|
||||
|
||||
statement ok
|
||||
PRAGMA enable_profiling
|
||||
|
||||
statement ok
|
||||
PRAGMA profiling_output='__TEST_DIR__/test.json'
|
||||
|
||||
statement ok
|
||||
PRAGMA profiling_mode = detailed
|
||||
|
||||
statement ok
|
||||
CREATE TABLE integers(i INTEGER)
|
||||
|
||||
statement ok
|
||||
INSERT INTO integers VALUES (3)
|
||||
|
||||
statement ok
|
||||
SELECT min (i + i) FROM integers
|
||||
|
||||
statement ok
|
||||
CREATE TABLE exprtest (a INTEGER, b INTEGER)
|
||||
|
||||
statement ok
|
||||
INSERT INTO exprtest VALUES (42, 10), (43, 100), (NULL, 1), (45, -1)
|
||||
|
||||
statement ok
|
||||
SELECT min (a + a ) FROM exprtest
|
||||
|
||||
statement ok
|
||||
SELECT a FROM exprtest WHERE a BETWEEN 43 AND 44
|
||||
|
||||
statement ok
|
||||
SELECT CASE a WHEN 42 THEN 100 WHEN 43 THEN 200 ELSE 300 END FROM exprtest
|
||||
|
||||
statement ok
|
||||
PRAGMA profiling_output='__TEST_DIR__/test_2.json'
|
||||
|
||||
# At least one of the lines should contain the word "Optimizer" to verify that we're getting optimizer timings
|
||||
query T
|
||||
SELECT COUNT(*) > 0
|
||||
FROM read_csv('__TEST_DIR__/test.json', columns={'c': 'VARCHAR'}, delim=NULL, header=0, quote=NULL, escape=NULL, auto_detect = false)
|
||||
WHERE contains(c, 'Optimizer');
|
||||
----
|
||||
true
|
||||
Reference in New Issue
Block a user