Skip to content

Commit d4788b9

Browse files
committed
debug measure time
1 parent 78519ee commit d4788b9

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

codeflash/tracer.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
import json
1515
import pickle
1616
import subprocess
17+
import time
18+
1719
import sys
1820
from argparse import ArgumentParser
1921
from pathlib import Path
@@ -31,6 +33,7 @@
3133

3234

3335
def main(args: Namespace | None = None) -> ArgumentParser:
36+
start = time.time()
3437
parser = ArgumentParser(allow_abbrev=False)
3538
parser.add_argument("-o", "--outfile", dest="outfile", help="Save trace to <outfile>", default="codeflash.trace")
3639
parser.add_argument("--only-functions", help="Trace only these functions", nargs="+", default=None)
@@ -173,7 +176,7 @@ def main(args: Namespace | None = None) -> ArgumentParser:
173176
sys.exit(1)
174177
finally:
175178
result_pickle_file_path.unlink(missing_ok=True)
176-
179+
print(f"Took {time.time() - start}")
177180
if not parsed_args.trace_only and replay_test_paths:
178181
from codeflash.cli_cmds.cli import parse_args, process_pyproject_config
179182
from codeflash.cli_cmds.cmd_init import CODEFLASH_LOGO

0 commit comments

Comments
 (0)