From 1fcb6c9f44f51c458229d7180747e692b896f09a Mon Sep 17 00:00:00 2001 From: hauntsaninja Date: Fri, 18 Aug 2023 14:04:02 -0700 Subject: [PATCH] [tmp debug timing] --- piptools/scripts/compile.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/piptools/scripts/compile.py b/piptools/scripts/compile.py index 9eae0f209..a0c01e3a6 100755 --- a/piptools/scripts/compile.py +++ b/piptools/scripts/compile.py @@ -303,6 +303,11 @@ def cli( setup_file_found = False for src_file in src_files: is_setup_file = os.path.basename(src_file) in METADATA_FILENAMES + + import time + + start_t = time.perf_counter() + if src_file == "-": # pip requires filenames and not files. Since we want to support # piping from stdin, we need to briefly save the input from stdin @@ -390,6 +395,9 @@ def cli( ) ) + end_t = time.perf_counter() + print(f"req {src_file} took {end_t - start_t} seconds") + # Parse all constraints from `--constraint` files for filename in constraint: constraints.extend(