File tree Expand file tree Collapse file tree 4 files changed +9
-6
lines changed
test/test_profiling/test_sampling_profiler Expand file tree Collapse file tree 4 files changed +9
-6
lines changed Original file line number Diff line number Diff line change 1313from .gecko_collector import GeckoCollector
1414from .constants import (
1515 PROFILING_MODE_WALL ,
16+ PROFILING_MODE_CPU ,
17+ PROFILING_MODE_GIL ,
1618 PROFILING_MODE_ALL ,
1719)
1820try :
Original file line number Diff line number Diff line change @@ -444,10 +444,11 @@ def test_mode_constants_are_defined(self):
444444
445445 def test_parse_mode_function (self ):
446446 """Test the _parse_mode function with all valid modes."""
447- self .assertEqual (profiling .sampling .sample ._parse_mode ("wall" ), 0 )
448- self .assertEqual (profiling .sampling .sample ._parse_mode ("cpu" ), 1 )
449- self .assertEqual (profiling .sampling .sample ._parse_mode ("gil" ), 2 )
447+ from profiling .sampling .cli import _parse_mode
448+ self .assertEqual (_parse_mode ("wall" ), 0 )
449+ self .assertEqual (_parse_mode ("cpu" ), 1 )
450+ self .assertEqual (_parse_mode ("gil" ), 2 )
450451
451452 # Test invalid mode raises KeyError
452453 with self .assertRaises (KeyError ):
453- profiling . sampling . sample . _parse_mode ("invalid" )
454+ _parse_mode ("invalid" )
Original file line number Diff line number Diff line change @@ -388,7 +388,7 @@ Add :func:`os.reload_environ` to ``os.__all__``.
388388.. nonce: L13UCV
389389.. section: Library
390390
391- Fix :func: ` profiling.sampling.sample ` incorrectly handling a
391+ Fix `` profiling.sampling.sample() ` ` incorrectly handling a
392392:exc: `FileNotFoundError ` or :exc: `PermissionError `.
393393
394394..
Original file line number Diff line number Diff line change 11Add a new ``--live `` mode to the tachyon profiler in
2- :mod: `profiling.sampling ` module. This mode consist of a live TUI that
2+ :mod: `! profiling.sampling ` module. This mode consist of a live TUI that
33displays real-time profiling statistics as the target application runs,
44similar to ``top ``. Patch by Pablo Galindo
You can’t perform that action at this time.
0 commit comments