@@ -31,7 +31,7 @@ def setup(self, trace_path:str, project_root:str) -> None:
3131            cur .execute ("PRAGMA journal_mode = MEMORY" )
3232            cur .execute (
3333                "CREATE TABLE IF NOT EXISTS benchmark_timings(" 
34-                 "benchmark_file_path  TEXT, benchmark_function_name TEXT, benchmark_line_number INTEGER," 
34+                 "benchmark_module_path  TEXT, benchmark_function_name TEXT, benchmark_line_number INTEGER," 
3535                "benchmark_time_ns INTEGER)" 
3636            )
3737            self ._connection .commit ()
@@ -54,7 +54,7 @@ def write_benchmark_timings(self) -> None:
5454            cur  =  self ._connection .cursor ()
5555            # Insert data into the benchmark_timings table 
5656            cur .executemany (
57-                 "INSERT INTO benchmark_timings (benchmark_file_path , benchmark_function_name, benchmark_line_number, benchmark_time_ns) VALUES (?, ?, ?, ?)" ,
57+                 "INSERT INTO benchmark_timings (benchmark_module_path , benchmark_function_name, benchmark_line_number, benchmark_time_ns) VALUES (?, ?, ?, ?)" ,
5858                self .benchmark_timings 
5959            )
6060            self ._connection .commit ()
@@ -93,7 +93,7 @@ def get_function_benchmark_timings(trace_path: Path) -> dict[str, dict[Benchmark
9393            # Query the function_calls table for all function calls 
9494            cursor .execute (
9595                "SELECT module_name, class_name, function_name, " 
96-                 "benchmark_file_path , benchmark_function_name, benchmark_line_number, function_time_ns " 
96+                 "benchmark_module_path , benchmark_function_name, benchmark_line_number, function_time_ns " 
9797                "FROM benchmark_function_timings" 
9898            )
9999
@@ -108,7 +108,7 @@ def get_function_benchmark_timings(trace_path: Path) -> dict[str, dict[Benchmark
108108                    qualified_name  =  f"{ module_name }  .{ function_name }  " 
109109
110110                # Create the benchmark key (file::function::line) 
111-                 benchmark_key  =  BenchmarkKey (file_path = benchmark_file , function_name = benchmark_func )
111+                 benchmark_key  =  BenchmarkKey (module_path = benchmark_file , function_name = benchmark_func )
112112                # Initialize the inner dictionary if needed 
113113                if  qualified_name  not  in   result :
114114                    result [qualified_name ] =  {}
@@ -150,20 +150,20 @@ def get_benchmark_timings(trace_path: Path) -> dict[BenchmarkKey, int]:
150150        try :
151151            # Query the benchmark_function_timings table to get total overhead for each benchmark 
152152            cursor .execute (
153-                 "SELECT benchmark_file_path , benchmark_function_name, benchmark_line_number, SUM(overhead_time_ns) " 
153+                 "SELECT benchmark_module_path , benchmark_function_name, benchmark_line_number, SUM(overhead_time_ns) " 
154154                "FROM benchmark_function_timings " 
155-                 "GROUP BY benchmark_file_path , benchmark_function_name, benchmark_line_number" 
155+                 "GROUP BY benchmark_module_path , benchmark_function_name, benchmark_line_number" 
156156            )
157157
158158            # Process overhead information 
159159            for  row  in  cursor .fetchall ():
160160                benchmark_file , benchmark_func , benchmark_line , total_overhead_ns  =  row 
161-                 benchmark_key  =  BenchmarkKey (file_path = benchmark_file , function_name = benchmark_func )
161+                 benchmark_key  =  BenchmarkKey (module_path = benchmark_file , function_name = benchmark_func )
162162                overhead_by_benchmark [benchmark_key ] =  total_overhead_ns  or  0   # Handle NULL sum case 
163163
164164            # Query the benchmark_timings table for total times 
165165            cursor .execute (
166-                 "SELECT benchmark_file_path , benchmark_function_name, benchmark_line_number, benchmark_time_ns " 
166+                 "SELECT benchmark_module_path , benchmark_function_name, benchmark_line_number, benchmark_time_ns " 
167167                "FROM benchmark_timings" 
168168            )
169169
@@ -172,7 +172,7 @@ def get_benchmark_timings(trace_path: Path) -> dict[BenchmarkKey, int]:
172172                benchmark_file , benchmark_func , benchmark_line , time_ns  =  row 
173173
174174                # Create the benchmark key (file::function::line) 
175-                 benchmark_key  =  BenchmarkKey (file_path = benchmark_file , function_name = benchmark_func )
175+                 benchmark_key  =  BenchmarkKey (module_path = benchmark_file , function_name = benchmark_func )
176176                # Subtract overhead from total time 
177177                overhead  =  overhead_by_benchmark .get (benchmark_key , 0 )
178178                result [benchmark_key ] =  time_ns  -  overhead 
@@ -244,13 +244,13 @@ def test_something(benchmark):
244244            a 
245245
246246            """ 
247-             benchmark_file_path  =  module_name_from_file_path (Path (str (self .request .node .fspath )), Path (codeflash_benchmark_plugin .project_root ))
247+             benchmark_module_path  =  module_name_from_file_path (Path (str (self .request .node .fspath )), Path (codeflash_benchmark_plugin .project_root ))
248248            benchmark_function_name  =  self .request .node .name 
249249            line_number  =  int (str (sys ._getframe (1 ).f_lineno ))  # 1 frame up in the call stack 
250250
251251            # Set env vars so codeflash decorator can identify what benchmark its being run in 
252252            os .environ ["CODEFLASH_BENCHMARK_FUNCTION_NAME" ] =  benchmark_function_name 
253-             os .environ ["CODEFLASH_BENCHMARK_FILE_PATH " ] =  benchmark_file_path 
253+             os .environ ["CODEFLASH_BENCHMARK_MODULE_PATH " ] =  benchmark_module_path 
254254            os .environ ["CODEFLASH_BENCHMARK_LINE_NUMBER" ] =  str (line_number )
255255            os .environ ["CODEFLASH_BENCHMARKING" ] =  "True" 
256256
@@ -268,7 +268,7 @@ def test_something(benchmark):
268268            codeflash_trace .function_call_count  =  0 
269269            # Add to the benchmark timings buffer 
270270            codeflash_benchmark_plugin .benchmark_timings .append (
271-                 (benchmark_file_path , benchmark_function_name , line_number , end  -  start ))
271+                 (benchmark_module_path , benchmark_function_name , line_number , end  -  start ))
272272
273273            return  result 
274274
0 commit comments