1#include "catch.hpp"
2#include "test_helpers.hpp"
3
4#include <iostream>
5
6using namespace duckdb;
7using namespace std;
8
9TEST_CASE("Test query profiler", "[api]") {
10 unique_ptr<QueryResult> result;
11 DuckDB db(nullptr);
12 Connection con(db);
13 string output;
14
15 con.EnableQueryVerification();
16 con.EnableProfiling();
17
18 REQUIRE_NO_FAIL(con.Query("SELECT * FROM (SELECT 42) tbl1, (SELECT 33) tbl2"));
19
20 output = con.GetProfilingInformation();
21 REQUIRE(output.size() > 0);
22
23 output = con.GetProfilingInformation(ProfilerPrintFormat::JSON);
24 REQUIRE(output.size() > 0);
25}
26