@@ -53,7 +53,7 @@ counts**, not direct measurements. Tachyon counts how many times each function
5353appears in the collected samples, then multiplies by the sampling interval to
5454estimate time.
5555
56- For example, with a 100 microsecond sampling interval over a 10-second profile,
56+ For example, with a 10 kHz sampling rate over a 10-second profile,
5757Tachyon collects approximately 100,000 samples. If a function appears in 5,000
5858samples (5% of total), Tachyon estimates it consumed 5% of the 10-second
5959duration, or about 500 milliseconds. This is a statistical estimate, not a
@@ -142,7 +142,7 @@ Use live mode for real-time monitoring (press ``q`` to quit)::
142142
143143Profile for 60 seconds with a faster sampling rate::
144144
145- python -m profiling.sampling run -d 60 -i 50 script.py
145+ python -m profiling.sampling run -d 60 -r 20khz script.py
146146
147147Generate a line-by-line heatmap::
148148
@@ -326,8 +326,8 @@ The default configuration works well for most use cases:
326326
327327 * - Option
328328 - Default
329- * - Default for ``--interval `` / ``-i ``
330- - 100 µs between samples (~10,000 samples/sec)
329+ * - Default for ``--sampling-rate `` / ``-r ``
330+ - 1 kHz
331331 * - Default for ``--duration `` / ``-d ``
332332 - 10 seconds
333333 * - Default for ``--all-threads `` / ``-a ``
@@ -346,23 +346,22 @@ The default configuration works well for most use cases:
346346 - Disabled (non-blocking sampling)
347347
348348
349- Sampling interval and duration
350- ------------------------------
349+ Sampling rate and duration
350+ --------------------------
351351
352- The two most fundamental parameters are the sampling interval and duration.
352+ The two most fundamental parameters are the sampling rate and duration.
353353Together, these determine how many samples will be collected during a profiling
354354session.
355355
356- The :option: `--interval ` option (:option: `-i `) sets the time between samples in
357- microseconds. The default is 100 microseconds, which produces approximately
358- 10,000 samples per second::
356+ The :option: `--sampling-rate ` option (:option: `-r `) sets how frequently samples
357+ are collected. The default is 1 kHz (10,000 samples per second)::
359358
360- python -m profiling.sampling run -i 50 script.py
359+ python -m profiling.sampling run -r 20khz script.py
361360
362- Lower intervals capture more samples and provide finer-grained data at the
363- cost of slightly higher profiler CPU usage. Higher intervals reduce profiler
361+ Higher rates capture more samples and provide finer-grained data at the
362+ cost of slightly higher profiler CPU usage. Lower rates reduce profiler
364363overhead but may miss short-lived functions. For most applications, the
365- default interval provides a good balance between accuracy and overhead.
364+ default rate provides a good balance between accuracy and overhead.
366365
367366The :option: `--duration ` option (:option: `-d `) sets how long to profile in seconds. The
368367default is 10 seconds::
@@ -573,9 +572,9 @@ appended:
573572- For pstats format (which defaults to stdout), subprocesses produce files like
574573 ``profile_12345.pstats ``
575574
576- The subprocess profilers inherit most sampling options from the parent (interval,
577- duration, thread selection, native frames, GC frames, async-aware mode, and
578- output format). All Python descendant processes are profiled recursively,
575+ The subprocess profilers inherit most sampling options from the parent (sampling
576+ rate, duration, thread selection, native frames, GC frames, async-aware mode,
577+ and output format). All Python descendant processes are profiled recursively,
579578including grandchildren and further descendants.
580579
581580Subprocess detection works by periodically scanning for new descendants of
@@ -1389,9 +1388,9 @@ Global options
13891388Sampling options
13901389----------------
13911390
1392- .. option :: -i < microseconds >, --interval < microseconds >
1391+ .. option :: -r < rate >, --sampling-rate < rate >
13931392
1394- Sampling interval in microseconds . Default: 100 .
1393+ Sampling rate (for example, `` 10000 ``, `` 10khz ``, `` 10k ``) . Default: `` 1khz `` .
13951394
13961395.. option :: -d <seconds >, --duration <seconds >
13971396
0 commit comments