We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d1dcb98 commit aae033cCopy full SHA for aae033c
tests/fast/test_profiler.py
@@ -0,0 +1,18 @@
1
+import pytest
2
+import duckdb
3
+
4
+class TestProfiler:
5
+ def test_profiler_matches_expected_format(self):
6
+ con = duckdb.connect()
7
+ con.enable_profiling()
8
+ con.execute("from range(100_000);")
9
10
+ # Test JSON format
11
+ profiling_info_json = con.get_profiling_information(format="json")
12
+ assert isinstance(profiling_info_json, str)
13
+ print(profiling_info_json)
14
15
+ # Test Text format
16
+ profiling_info_text = con.get_profiling_information(format="query_tree_optimizer")
17
+ assert isinstance(profiling_info_text, str)
18
+ print(profiling_info_text) # Print to visually inspect the text format
0 commit comments