Skip to content

Commit 4bddc1e

Browse files
committed
remove debug prints
1 parent 41d314d commit 4bddc1e

File tree

3 files changed

+1
-22
lines changed

3 files changed

+1
-22
lines changed

codeflash/benchmarking/plugin/plugin.py

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -285,20 +285,4 @@ def _run_benchmark(self, func, *args, **kwargs): # noqa: ANN001, ANN002, ANN003
285285
return result
286286

287287

288-
codeflash_benchmark_plugin = CodeFlashBenchmarkPlugin()
289-
290-
291-
# def pytest_configure(config: pytest.Config) -> None:
292-
# """Register the benchmark marker and disable conflicting plugins."""
293-
# config.addinivalue_line("markers", "benchmark: mark test as a benchmark that should be run with codeflash tracing")
294-
295-
# if config.getoption("--codeflash-trace") and PYTEST_BENCHMARK_INSTALLED:
296-
# config.option.benchmark_disable = True
297-
# config.pluginmanager.set_blocked("pytest_benchmark")
298-
# config.pluginmanager.set_blocked("pytest-benchmark")
299-
300-
301-
# def pytest_addoption(parser: pytest.Parser) -> None:
302-
# parser.addoption(
303-
# "--codeflash-trace", action="store_true", default=False, help="Enable CodeFlash tracing for benchmarks"
304-
# )
288+
codeflash_benchmark_plugin = CodeFlashBenchmarkPlugin()

codeflash/benchmarking/trace_benchmarks.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
def trace_benchmarks_pytest(
1313
benchmarks_root: Path, tests_root: Path, project_root: Path, trace_file: Path, timeout: int = 300
1414
) -> None:
15-
logger.info("Tracing benchmarks with codeflash-benchmark")
1615
benchmark_env = os.environ.copy()
1716
if "PYTHONPATH" not in benchmark_env:
1817
benchmark_env["PYTHONPATH"] = str(project_root)
@@ -33,8 +32,6 @@ def trace_benchmarks_pytest(
3332
env=benchmark_env,
3433
timeout=timeout,
3534
)
36-
logger.info(f"ran with args: {result.args}")
37-
logger.info(f"Pytest output: {result.stderr}")
3835
if result.returncode != 0:
3936
if "ERROR collecting" in result.stdout:
4037
# Pattern matches "===== ERRORS =====" (any number of =) and captures everything after

codeflash/optimization/optimizer.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,6 @@ def run_benchmarks(
7474
for file in file_to_funcs_to_optimize:
7575
with file.open("r", encoding="utf8") as f:
7676
file_path_to_source_code[file] = f.read()
77-
console.print(f"Instrumented {len(file_to_funcs_to_optimize)} files for benchmarking…")
7877
try:
7978
instrument_codeflash_trace_decorator(file_to_funcs_to_optimize)
8079
trace_file = Path(self.args.benchmarks_root) / "benchmarks.trace"
@@ -84,7 +83,6 @@ def run_benchmarks(
8483
self.replay_tests_dir = Path(
8584
tempfile.mkdtemp(prefix="codeflash_replay_tests_", dir=self.args.benchmarks_root)
8685
)
87-
logger.info(f"Tracing benchmarks to {trace_file} in {self.replay_tests_dir}")
8886
trace_benchmarks_pytest(
8987
self.args.benchmarks_root, self.args.tests_root, self.args.project_root, trace_file
9088
) # Run all tests that use pytest-benchmark

0 commit comments

Comments
 (0)