Add mode options to a parser.
(parser)
| 417 | |
| 418 | |
| 419 | def _add_mode_options(parser): |
| 420 | """Add mode options to a parser.""" |
| 421 | mode_group = parser.add_argument_group("Mode options") |
| 422 | mode_group.add_argument( |
| 423 | "--mode", |
| 424 | choices=["wall", "cpu", "gil", "exception"], |
| 425 | default="wall", |
| 426 | help="Sampling mode: wall (all samples), cpu (only samples when thread is on CPU), " |
| 427 | "gil (only samples when thread holds the GIL), " |
| 428 | "exception (only samples when thread has an active exception). " |
| 429 | "Incompatible with --async-aware", |
| 430 | ) |
| 431 | mode_group.add_argument( |
| 432 | "--async-mode", |
| 433 | choices=["running", "all"], |
| 434 | default="running", |
| 435 | help='Async profiling mode: "running" (only running task) ' |
| 436 | 'or "all" (all tasks including waiting). Requires --async-aware', |
| 437 | ) |
| 438 | |
| 439 | |
| 440 | def _add_format_options(parser, include_compression=True, include_binary=True): |
no test coverage detected
searching dependent graphs…