Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork33.5k
Open
Description
Bug report
Bug description:
➜ cpython git:(hy/handle_ctrl_c_in_sampling) sudo ./python.exe -m profiling.sampling run -d 99999 -m testPassword:== CPython 3.15.0a2+ free-threading build (heads/main-dirty:bc9e63dd9d, Nov 27 2025, 09:14:30) [Clang 17.0.0 (clang-1700.0.13.5)]== macOS-26.1-arm64-arm-64bit-Mach-O little-endian== Python build: free_threading release== cwd: /Users/hyi/prs/cpython/build/test_python_worker_57706æ== CPU count: 8== encodings: locale=UTF-8 FS=utf-8== resources: all test resources are disabled, use -u option to unskip testsUsing random seed: 9118128340:00:00 load avg: 3.47 Run 497 tests sequentially in a single process0:00:00 load avg: 3.47 [ 1/497] test.test_asyncio.test_base_events0:00:01 load avg: 3.47 [ 1/497] test.test_asyncio.test_base_events passed0:00:01 load avg: 3.47 [ 2/497] test.test_asyncio.test_buffered_proto0:00:01 load avg: 3.47 [ 2/497] test.test_asyncio.test_buffered_proto passed0:00:01 load avg: 3.47 [ 3/497] test.test_asyncio.test_context0:00:01 load avg: 3.47 [ 3/497] test.test_asyncio.test_context passed0:00:01 load avg: 3.47 [ 4/497] test.test_asyncio.test_eager_task_factory^CTraceback (most recent call last): File "<frozen runpy>", line 198, in _run_module_as_main File "<frozen runpy>", line 88, in _run_code File "/Users/hyi/prs/cpython/Lib/profiling/sampling/__main__.py", line 64, in <module> main() ~~~~^^ File "/Users/hyi/prs/cpython/Lib/profiling/sampling/cli.py", line 525, in main handler(args) ~~~~~~~^^^^^^ File "/Users/hyi/prs/cpython/Lib/profiling/sampling/cli.py", line 601, in _handle_run collector = sample( process.pid, ...<6 lines>... gc=args.gc, ) File "/Users/hyi/prs/cpython/Lib/profiling/sampling/sample.py", line 228, in sample profiler.sample(collector, duration_sec) ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/hyi/prs/cpython/Lib/profiling/sampling/sample.py", line 65, in sample current_time = time.perf_counter()KeyboardInterruptseems its better just print the result when KeyboardInterrupt(ctrl+c)
CPython versions tested on:
CPython main branch
Operating systems tested on:
macOS