austin-python 2.1.2__tar.gz → 2.3.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {austin_python-2.1.2 → austin_python-2.3.0}/.flake8 +1 -2
- {austin_python-2.1.2 → austin_python-2.3.0}/PKG-INFO +5 -5
- {austin_python-2.1.2 → austin_python-2.3.0}/README.md +1 -1
- {austin_python-2.1.2 → austin_python-2.3.0}/austin/base.py +0 -1
- {austin_python-2.1.2 → austin_python-2.3.0}/austin/events.py +30 -1
- {austin_python-2.1.2 → austin_python-2.3.0}/austin/format/collapsed_stack.py +4 -5
- {austin_python-2.1.2 → austin_python-2.3.0}/austin/format/compress.py +7 -5
- {austin_python-2.1.2 → austin_python-2.3.0}/austin/format/mojo.py +450 -33
- austin_python-2.3.0/austin/format/mojo_compress.py +122 -0
- {austin_python-2.1.2 → austin_python-2.3.0}/austin/format/pprof/__init__.py +0 -1
- {austin_python-2.1.2 → austin_python-2.3.0}/austin/format/speedscope.py +0 -2
- {austin_python-2.1.2 → austin_python-2.3.0}/austin/stats.py +10 -8
- {austin_python-2.1.2 → austin_python-2.3.0}/austin/tools/diff.py +6 -4
- {austin_python-2.1.2 → austin_python-2.3.0}/austin/tools/mojodbg.py +0 -1
- {austin_python-2.1.2 → austin_python-2.3.0}/austin/tools/resolve.py +8 -5
- {austin_python-2.1.2 → austin_python-2.3.0}/pyproject.toml +31 -12
- {austin_python-2.1.2 → austin_python-2.3.0}/test/conftest.py +0 -1
- austin_python-2.3.0/test/data/repeat.austin +1717 -0
- austin_python-2.3.0/test/data/repeat.mojo +0 -0
- {austin_python-2.1.2 → austin_python-2.3.0}/test/format/test_compress.py +33 -0
- austin_python-2.3.0/test/format/test_mojo.py +504 -0
- austin_python-2.3.0/test/format/test_mojo_compress.py +303 -0
- {austin_python-2.1.2 → austin_python-2.3.0}/test/format/test_speedscope.py +0 -1
- {austin_python-2.1.2 → austin_python-2.3.0}/test/stats/test_austin_stats.py +1 -2
- {austin_python-2.1.2 → austin_python-2.3.0}/test/test_aio.py +23 -1
- austin_python-2.3.0/test/test_base.py +39 -0
- {austin_python-2.1.2 → austin_python-2.3.0}/test/test_semver.py +4 -0
- {austin_python-2.1.2 → austin_python-2.3.0}/test/test_simple.py +12 -0
- austin_python-2.3.0/test/tools/test_diff.py +13 -0
- {austin_python-2.1.2 → austin_python-2.3.0}/test/tools/test_resolve.py +0 -1
- austin_python-2.1.2/test/format/test_mojo.py +0 -238
- austin_python-2.1.2/test/tools/test_diff.py +0 -11
- {austin_python-2.1.2 → austin_python-2.3.0}/.gitignore +0 -0
- {austin_python-2.1.2 → austin_python-2.3.0}/.readthedocs.yml +0 -0
- {austin_python-2.1.2 → austin_python-2.3.0}/AUTHORS +0 -0
- {austin_python-2.1.2 → austin_python-2.3.0}/CODE-OF-CONDUCT.md +0 -0
- {austin_python-2.1.2 → austin_python-2.3.0}/CONTRIBUTING.md +0 -0
- {austin_python-2.1.2 → austin_python-2.3.0}/COPYING +0 -0
- {austin_python-2.1.2 → austin_python-2.3.0}/ISSUE_TEMPLATE.md +0 -0
- {austin_python-2.1.2 → austin_python-2.3.0}/LICENSE.md +0 -0
- {austin_python-2.1.2 → austin_python-2.3.0}/MANIFEST.in +0 -0
- {austin_python-2.1.2 → austin_python-2.3.0}/PULL_REQUEST_TEMPLATE.md +0 -0
- {austin_python-2.1.2 → austin_python-2.3.0}/austin/__init__.py +0 -0
- {austin_python-2.1.2 → austin_python-2.3.0}/austin/aio.py +0 -0
- {austin_python-2.1.2 → austin_python-2.3.0}/austin/cli.py +0 -0
- {austin_python-2.1.2 → austin_python-2.3.0}/austin/config.py +0 -0
- {austin_python-2.1.2 → austin_python-2.3.0}/austin/errors.py +0 -0
- {austin_python-2.1.2 → austin_python-2.3.0}/austin/format/__init__.py +0 -0
- {austin_python-2.1.2 → austin_python-2.3.0}/austin/format/pprof/__main__.py +0 -0
- {austin_python-2.1.2 → austin_python-2.3.0}/austin/format/pprof/profile.proto +0 -0
- {austin_python-2.1.2 → austin_python-2.3.0}/austin/format/pprof/profile_pb2.py +0 -0
- {austin_python-2.1.2 → austin_python-2.3.0}/austin/simple.py +0 -0
- {austin_python-2.1.2 → austin_python-2.3.0}/austin/threads.py +0 -0
- {austin_python-2.1.2 → austin_python-2.3.0}/test/__init__.py +0 -0
- {austin_python-2.1.2 → austin_python-2.3.0}/test/data/austin.json +0 -0
- {austin_python-2.1.2 → austin_python-2.3.0}/test/data/austin.out +0 -0
- {austin_python-2.1.2 → austin_python-2.3.0}/test/data/austin.pprof +0 -0
- {austin_python-2.1.2 → austin_python-2.3.0}/test/data/austinp.mojo +0 -0
- {austin_python-2.1.2 → austin_python-2.3.0}/test/data/austinp.resolved.mojo +0 -0
- {austin_python-2.1.2 → austin_python-2.3.0}/test/data/column.mojo +0 -0
- {austin_python-2.1.2 → austin_python-2.3.0}/test/data/column.py +0 -0
- {austin_python-2.1.2 → austin_python-2.3.0}/test/data/diff_a-b.austin +0 -0
- {austin_python-2.1.2 → austin_python-2.3.0}/test/data/diff_a.austin +0 -0
- {austin_python-2.1.2 → austin_python-2.3.0}/test/data/diff_b.austin +0 -0
- {austin_python-2.1.2 → austin_python-2.3.0}/test/data/mp.austin +0 -0
- {austin_python-2.1.2 → austin_python-2.3.0}/test/data/mp.mojo +0 -0
- {austin_python-2.1.2 → austin_python-2.3.0}/test/data/test.austin +0 -0
- {austin_python-2.1.2 → austin_python-2.3.0}/test/data/test.mojo +0 -0
- {austin_python-2.1.2 → austin_python-2.3.0}/test/format/__init__.py +0 -0
- {austin_python-2.1.2 → austin_python-2.3.0}/test/format/test_pprof.py +0 -0
- {austin_python-2.1.2 → austin_python-2.3.0}/test/stats/test_austin_file_reader.py +0 -0
- {austin_python-2.1.2 → austin_python-2.3.0}/test/stats/test_hierarchical_stats.py +0 -0
- {austin_python-2.1.2 → austin_python-2.3.0}/test/test_cli.py +0 -0
- {austin_python-2.1.2 → austin_python-2.3.0}/test/test_config.py +0 -0
- {austin_python-2.1.2 → austin_python-2.3.0}/test/test_threads.py +0 -0
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
[flake8]
|
|
2
2
|
select = ANN,B,B9,C,D,E,F,W,I
|
|
3
|
-
ignore = ANN101,ANN102,ANN401,B950,D100,D102,D103,D104,D107,E203,E501,I001,I005,W503,W606
|
|
3
|
+
ignore = ANN101,ANN102,ANN401,B905,B950,D100,D102,D103,D104,D107,E203,E501,I001,I005,W503,W606
|
|
4
4
|
exclude =
|
|
5
5
|
austin/format/pprof/profile_pb2.py
|
|
6
6
|
test/data/column.py
|
|
7
7
|
max-line-length = 88
|
|
8
8
|
docstring-convention = google
|
|
9
|
-
import-order-style = pep8
|
|
10
9
|
application-import-names = austin
|
|
11
10
|
per-file-ignores =
|
|
12
11
|
test/*:ANN,D
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
2
|
Name: austin-python
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.3.0
|
|
4
4
|
Summary: Python wrapper for Austin, the CPython frame stack sampler.
|
|
5
5
|
Project-URL: homepage, https://github.com/P403n1x87/austin-python
|
|
6
6
|
Project-URL: documentation, https://austin-python.readthedocs.io
|
|
@@ -15,12 +15,12 @@ Keywords: development,performance,profiling,testing
|
|
|
15
15
|
Classifier: Development Status :: 5 - Production/Stable
|
|
16
16
|
Classifier: Intended Audience :: Developers
|
|
17
17
|
Classifier: License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)
|
|
18
|
-
Classifier: Programming Language :: Python :: 3.9
|
|
19
18
|
Classifier: Programming Language :: Python :: 3.10
|
|
20
19
|
Classifier: Programming Language :: Python :: 3.11
|
|
21
20
|
Classifier: Programming Language :: Python :: 3.12
|
|
22
21
|
Classifier: Programming Language :: Python :: 3.13
|
|
23
|
-
|
|
22
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
23
|
+
Requires-Python: >=3.10
|
|
24
24
|
Requires-Dist: protobuf~=3.12
|
|
25
25
|
Requires-Dist: psutil>=5.7.0
|
|
26
26
|
Requires-Dist: toml~=0.10
|
|
@@ -187,7 +187,7 @@ raw samples by aggregation.
|
|
|
187
187
|
# Compatibility
|
|
188
188
|
|
|
189
189
|
The latest `austin-python` package is tested on Linux, macOS and Windows with
|
|
190
|
-
Python 3.9-3.
|
|
190
|
+
Python 3.9-3.14.
|
|
191
191
|
|
|
192
192
|
|
|
193
193
|
# Documentation
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import typing as t
|
|
2
2
|
from dataclasses import dataclass
|
|
3
3
|
|
|
4
|
-
|
|
5
4
|
ProcessId = int
|
|
6
5
|
ThreadName = str
|
|
7
6
|
InterpreterId = int
|
|
@@ -44,6 +43,35 @@ class AustinMetadata(AustinEvent):
|
|
|
44
43
|
value: str
|
|
45
44
|
|
|
46
45
|
|
|
46
|
+
@dataclass(frozen=True)
|
|
47
|
+
class AustinTask:
|
|
48
|
+
"""A node in an asyncio task tree (3.14+ only).
|
|
49
|
+
|
|
50
|
+
``frames`` is this task's own last-known suspended coroutine-chain
|
|
51
|
+
snapshot -- empty if it was never captured suspended (e.g. it was only
|
|
52
|
+
ever seen actively running rather than awaiting something). ``awaiting``
|
|
53
|
+
are the tasks this task is itself awaiting, i.e. the tasks for which this
|
|
54
|
+
task is the direct waiter.
|
|
55
|
+
|
|
56
|
+
``elapsed`` does NOT describe ``frames``. Austin only re-samples a task's
|
|
57
|
+
chain (and reports a new node) when its identity has actually changed
|
|
58
|
+
since the last scan, so the two are always one step apart: ``frames`` is
|
|
59
|
+
the task's brand new position (just captured because it changed), while
|
|
60
|
+
``elapsed`` is how long the task dwelled at its *previous*, now-replaced
|
|
61
|
+
position -- the earliest point at which that duration could be known at
|
|
62
|
+
all. None on a task's first-ever sighting, when there is no previous
|
|
63
|
+
position to report a duration for. Always a wall/CPU time value, or None
|
|
64
|
+
if Austin was run in pure memory mode (no per-task memory delta exists to
|
|
65
|
+
report -- see austin's own py_proc.c, _py_proc__maybe_discover_asyncio).
|
|
66
|
+
"""
|
|
67
|
+
|
|
68
|
+
task_id: int
|
|
69
|
+
name: t.Optional[str]
|
|
70
|
+
frames: t.Tuple[AustinFrame, ...] = ()
|
|
71
|
+
elapsed: t.Optional[MicroSeconds] = None
|
|
72
|
+
awaiting: t.Tuple["AustinTask", ...] = ()
|
|
73
|
+
|
|
74
|
+
|
|
47
75
|
@dataclass(frozen=True)
|
|
48
76
|
class AustinSample(AustinEvent):
|
|
49
77
|
"""Austin sample."""
|
|
@@ -64,6 +92,7 @@ class AustinSample(AustinEvent):
|
|
|
64
92
|
frames: t.Optional[t.Tuple[AustinFrame, ...]] = None
|
|
65
93
|
gc: t.Optional[bool] = None
|
|
66
94
|
idle: t.Optional[bool] = None
|
|
95
|
+
tasks: t.Tuple[AustinTask, ...] = ()
|
|
67
96
|
|
|
68
97
|
def key(
|
|
69
98
|
self,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import typing as t
|
|
1
2
|
from functools import singledispatchmethod
|
|
2
3
|
from pathlib import Path
|
|
3
|
-
import typing as t
|
|
4
4
|
|
|
5
5
|
from austin.events import AustinEvent
|
|
6
6
|
from austin.events import AustinEventIterator
|
|
@@ -10,7 +10,6 @@ from austin.events import AustinMetrics
|
|
|
10
10
|
from austin.events import AustinSample
|
|
11
11
|
from austin.format.mojo import MojoStreamReader
|
|
12
12
|
|
|
13
|
-
|
|
14
13
|
__version__ = "0.1.0"
|
|
15
14
|
|
|
16
15
|
|
|
@@ -66,17 +65,17 @@ def parse_collapsed_stack(sample: str) -> AustinSample:
|
|
|
66
65
|
raise InvalidSample(sample)
|
|
67
66
|
|
|
68
67
|
if sample[0] != "P":
|
|
69
|
-
raise InvalidSample(f"No process ID in sample
|
|
68
|
+
raise InvalidSample(f"No process ID in sample {sample!r}")
|
|
70
69
|
|
|
71
70
|
head, _, metrics = sample.rpartition(" ")
|
|
72
71
|
process, _, rest = head.partition(";")
|
|
73
72
|
try:
|
|
74
73
|
pid = int(process[1:])
|
|
75
74
|
except ValueError:
|
|
76
|
-
raise InvalidSample(f"Invalid process ID in sample
|
|
75
|
+
raise InvalidSample(f"Invalid process ID in sample {sample!r}") from None
|
|
77
76
|
|
|
78
77
|
if rest[0] != "T":
|
|
79
|
-
raise InvalidSample(f"No thread ID in sample
|
|
78
|
+
raise InvalidSample(f"No thread ID in sample {sample!r}")
|
|
80
79
|
|
|
81
80
|
thread, _, frames_data = rest.partition(";")
|
|
82
81
|
thread = thread[1:]
|
|
@@ -62,9 +62,11 @@ def compress(source: AustinFileReader, dest: TextIO, counts: bool = False) -> No
|
|
|
62
62
|
formatter.format(
|
|
63
63
|
AustinSample.from_key_and_metrics(
|
|
64
64
|
key,
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
65
|
+
(
|
|
66
|
+
AustinMetrics(memory=metrics)
|
|
67
|
+
if is_memory
|
|
68
|
+
else AustinMetrics(time=metrics)
|
|
69
|
+
),
|
|
68
70
|
)
|
|
69
71
|
)
|
|
70
72
|
+ "\n"
|
|
@@ -108,10 +110,10 @@ def main() -> None:
|
|
|
108
110
|
|
|
109
111
|
try:
|
|
110
112
|
with (
|
|
111
|
-
|
|
113
|
+
open(args.input) as _fin,
|
|
112
114
|
open(args.output or args.input, "w") as fout,
|
|
113
115
|
):
|
|
114
|
-
compress(
|
|
116
|
+
compress(AustinFileReader(_fin), fout, args.counts)
|
|
115
117
|
except FileNotFoundError:
|
|
116
118
|
print(f"No such input file: {args.input}")
|
|
117
119
|
exit(1)
|