Skip to content

Commit 5f86bdd

Browse files
committed
PRAGMA journal to memory to make it faster
1 parent 5a34697 commit 5f86bdd

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

codeflash/benchmarking/codeflash_trace.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ def setup(self, trace_path: str) -> None:
3131
self._connection = sqlite3.connect(self._trace_path)
3232
cur = self._connection.cursor()
3333
cur.execute("PRAGMA synchronous = OFF")
34+
cur.execute("PRAGMA journal_mode = MEMORY")
3435
cur.execute(
3536
"CREATE TABLE IF NOT EXISTS benchmark_function_timings("
3637
"function_name TEXT, class_name TEXT, module_name TEXT, file_path TEXT,"

codeflash/benchmarking/plugin/plugin.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ def setup(self, trace_path:str) -> None:
2222
self._connection = sqlite3.connect(self._trace_path)
2323
cur = self._connection.cursor()
2424
cur.execute("PRAGMA synchronous = OFF")
25+
cur.execute("PRAGMA journal_mode = MEMORY")
2526
cur.execute(
2627
"CREATE TABLE IF NOT EXISTS benchmark_timings("
2728
"benchmark_file_path TEXT, benchmark_function_name TEXT, benchmark_line_number INTEGER,"

0 commit comments

Comments
 (0)