austin-python 2.1.0__tar.gz → 2.1.1__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.0 → austin_python-2.1.1}/PKG-INFO +1 -1
- {austin_python-2.1.0 → austin_python-2.1.1}/austin/format/collapsed_stack.py +1 -1
- {austin_python-2.1.0 → austin_python-2.1.1}/austin/format/pprof/__main__.py +7 -4
- {austin_python-2.1.0 → austin_python-2.1.1}/austin/format/speedscope.py +23 -15
- {austin_python-2.1.0 → austin_python-2.1.1}/test/data/austin.json +1 -1
- {austin_python-2.1.0 → austin_python-2.1.1}/.flake8 +0 -0
- {austin_python-2.1.0 → austin_python-2.1.1}/.gitignore +0 -0
- {austin_python-2.1.0 → austin_python-2.1.1}/.readthedocs.yml +0 -0
- {austin_python-2.1.0 → austin_python-2.1.1}/AUTHORS +0 -0
- {austin_python-2.1.0 → austin_python-2.1.1}/CODE-OF-CONDUCT.md +0 -0
- {austin_python-2.1.0 → austin_python-2.1.1}/CONTRIBUTING.md +0 -0
- {austin_python-2.1.0 → austin_python-2.1.1}/COPYING +0 -0
- {austin_python-2.1.0 → austin_python-2.1.1}/ISSUE_TEMPLATE.md +0 -0
- {austin_python-2.1.0 → austin_python-2.1.1}/LICENSE.md +0 -0
- {austin_python-2.1.0 → austin_python-2.1.1}/MANIFEST.in +0 -0
- {austin_python-2.1.0 → austin_python-2.1.1}/PULL_REQUEST_TEMPLATE.md +0 -0
- {austin_python-2.1.0 → austin_python-2.1.1}/README.md +0 -0
- {austin_python-2.1.0 → austin_python-2.1.1}/austin/__init__.py +0 -0
- {austin_python-2.1.0 → austin_python-2.1.1}/austin/aio.py +0 -0
- {austin_python-2.1.0 → austin_python-2.1.1}/austin/base.py +0 -0
- {austin_python-2.1.0 → austin_python-2.1.1}/austin/cli.py +0 -0
- {austin_python-2.1.0 → austin_python-2.1.1}/austin/config.py +0 -0
- {austin_python-2.1.0 → austin_python-2.1.1}/austin/errors.py +0 -0
- {austin_python-2.1.0 → austin_python-2.1.1}/austin/events.py +0 -0
- {austin_python-2.1.0 → austin_python-2.1.1}/austin/format/__init__.py +0 -0
- {austin_python-2.1.0 → austin_python-2.1.1}/austin/format/compress.py +0 -0
- {austin_python-2.1.0 → austin_python-2.1.1}/austin/format/mojo.py +0 -0
- {austin_python-2.1.0 → austin_python-2.1.1}/austin/format/pprof/__init__.py +0 -0
- {austin_python-2.1.0 → austin_python-2.1.1}/austin/format/pprof/profile.proto +0 -0
- {austin_python-2.1.0 → austin_python-2.1.1}/austin/format/pprof/profile_pb2.py +0 -0
- {austin_python-2.1.0 → austin_python-2.1.1}/austin/simple.py +0 -0
- {austin_python-2.1.0 → austin_python-2.1.1}/austin/stats.py +0 -0
- {austin_python-2.1.0 → austin_python-2.1.1}/austin/threads.py +0 -0
- {austin_python-2.1.0 → austin_python-2.1.1}/austin/tools/diff.py +0 -0
- {austin_python-2.1.0 → austin_python-2.1.1}/austin/tools/mojodbg.py +0 -0
- {austin_python-2.1.0 → austin_python-2.1.1}/austin/tools/resolve.py +0 -0
- {austin_python-2.1.0 → austin_python-2.1.1}/pyproject.toml +0 -0
- {austin_python-2.1.0 → austin_python-2.1.1}/test/__init__.py +0 -0
- {austin_python-2.1.0 → austin_python-2.1.1}/test/conftest.py +0 -0
- {austin_python-2.1.0 → austin_python-2.1.1}/test/data/austin.out +0 -0
- {austin_python-2.1.0 → austin_python-2.1.1}/test/data/austin.pprof +0 -0
- {austin_python-2.1.0 → austin_python-2.1.1}/test/data/austinp.mojo +0 -0
- {austin_python-2.1.0 → austin_python-2.1.1}/test/data/austinp.resolved.mojo +0 -0
- {austin_python-2.1.0 → austin_python-2.1.1}/test/data/column.mojo +0 -0
- {austin_python-2.1.0 → austin_python-2.1.1}/test/data/column.py +0 -0
- {austin_python-2.1.0 → austin_python-2.1.1}/test/data/diff_a-b.austin +0 -0
- {austin_python-2.1.0 → austin_python-2.1.1}/test/data/diff_a.austin +0 -0
- {austin_python-2.1.0 → austin_python-2.1.1}/test/data/diff_b.austin +0 -0
- {austin_python-2.1.0 → austin_python-2.1.1}/test/data/mp.austin +0 -0
- {austin_python-2.1.0 → austin_python-2.1.1}/test/data/mp.mojo +0 -0
- {austin_python-2.1.0 → austin_python-2.1.1}/test/data/test.austin +0 -0
- {austin_python-2.1.0 → austin_python-2.1.1}/test/data/test.mojo +0 -0
- {austin_python-2.1.0 → austin_python-2.1.1}/test/format/__init__.py +0 -0
- {austin_python-2.1.0 → austin_python-2.1.1}/test/format/test_compress.py +0 -0
- {austin_python-2.1.0 → austin_python-2.1.1}/test/format/test_mojo.py +0 -0
- {austin_python-2.1.0 → austin_python-2.1.1}/test/format/test_pprof.py +0 -0
- {austin_python-2.1.0 → austin_python-2.1.1}/test/format/test_speedscope.py +0 -0
- {austin_python-2.1.0 → austin_python-2.1.1}/test/stats/test_austin_file_reader.py +0 -0
- {austin_python-2.1.0 → austin_python-2.1.1}/test/stats/test_austin_stats.py +0 -0
- {austin_python-2.1.0 → austin_python-2.1.1}/test/stats/test_hierarchical_stats.py +0 -0
- {austin_python-2.1.0 → austin_python-2.1.1}/test/test_aio.py +0 -0
- {austin_python-2.1.0 → austin_python-2.1.1}/test/test_cli.py +0 -0
- {austin_python-2.1.0 → austin_python-2.1.1}/test/test_config.py +0 -0
- {austin_python-2.1.0 → austin_python-2.1.1}/test/test_semver.py +0 -0
- {austin_python-2.1.0 → austin_python-2.1.1}/test/test_simple.py +0 -0
- {austin_python-2.1.0 → austin_python-2.1.1}/test/test_threads.py +0 -0
- {austin_python-2.1.0 → austin_python-2.1.1}/test/tools/test_diff.py +0 -0
- {austin_python-2.1.0 → austin_python-2.1.1}/test/tools/test_resolve.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: austin-python
|
|
3
|
-
Version: 2.1.
|
|
3
|
+
Version: 2.1.1
|
|
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
|
|
@@ -48,7 +48,7 @@ def parse_frame(frame: str) -> AustinFrame:
|
|
|
48
48
|
filename, function, line = frame.rsplit(":", maxsplit=2)
|
|
49
49
|
except ValueError:
|
|
50
50
|
raise InvalidFrame(frame) from None
|
|
51
|
-
return AustinFrame(filename=filename, function=function, line=int(line))
|
|
51
|
+
return AustinFrame(filename=filename, function=function, line=int(line or 0))
|
|
52
52
|
|
|
53
53
|
|
|
54
54
|
def parse_collapsed_stack(sample: str) -> AustinSample:
|
|
@@ -22,6 +22,7 @@
|
|
|
22
22
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
23
23
|
|
|
24
24
|
from argparse import ArgumentParser
|
|
25
|
+
from pathlib import Path
|
|
25
26
|
|
|
26
27
|
from austin.events import AustinMetadata
|
|
27
28
|
from austin.events import AustinSample
|
|
@@ -41,19 +42,21 @@ def main() -> None:
|
|
|
41
42
|
|
|
42
43
|
arg_parser.add_argument(
|
|
43
44
|
"input",
|
|
44
|
-
type=
|
|
45
|
+
type=Path,
|
|
45
46
|
help="The input file containing Austin samples.",
|
|
46
47
|
)
|
|
47
48
|
arg_parser.add_argument(
|
|
48
|
-
"output",
|
|
49
|
+
"output",
|
|
50
|
+
type=Path,
|
|
51
|
+
help="The name of the output pprof file.",
|
|
49
52
|
)
|
|
50
53
|
|
|
51
|
-
arg_parser.add_argument("-V", "--version", action="version", version="0.2.
|
|
54
|
+
arg_parser.add_argument("-V", "--version", action="version", version="0.2.1")
|
|
52
55
|
|
|
53
56
|
args = arg_parser.parse_args()
|
|
54
57
|
|
|
55
58
|
try:
|
|
56
|
-
with
|
|
59
|
+
with args.input.open() as austin, AustinFileReader(austin) as fin:
|
|
57
60
|
pprof = None
|
|
58
61
|
for e in fin:
|
|
59
62
|
if isinstance(e, AustinMetadata) and e.name == "mode":
|
|
@@ -26,6 +26,7 @@ from dataclasses import asdict
|
|
|
26
26
|
from dataclasses import dataclass
|
|
27
27
|
from dataclasses import field
|
|
28
28
|
from enum import Enum
|
|
29
|
+
from pathlib import Path
|
|
29
30
|
from typing import Dict
|
|
30
31
|
from typing import List
|
|
31
32
|
from typing import Optional
|
|
@@ -33,13 +34,14 @@ from typing import TextIO
|
|
|
33
34
|
from typing import Union
|
|
34
35
|
|
|
35
36
|
from austin.events import AustinFrame
|
|
37
|
+
from austin.events import AustinMetadata
|
|
36
38
|
from austin.events import AustinSample
|
|
37
39
|
from austin.format import Mode
|
|
38
40
|
from austin.format.collapsed_stack import AustinFileReader
|
|
39
41
|
from austin.format.collapsed_stack import InvalidSample
|
|
40
42
|
|
|
41
43
|
|
|
42
|
-
__version__ = "0.3.
|
|
44
|
+
__version__ = "0.3.1"
|
|
43
45
|
|
|
44
46
|
SpeedscopeJson = Dict
|
|
45
47
|
SpeedscopeWeight = int
|
|
@@ -208,11 +210,11 @@ def main() -> None:
|
|
|
208
210
|
|
|
209
211
|
arg_parser.add_argument(
|
|
210
212
|
"input",
|
|
211
|
-
type=
|
|
213
|
+
type=Path,
|
|
212
214
|
help="The input file containing Austin samples in normal format.",
|
|
213
215
|
)
|
|
214
216
|
arg_parser.add_argument(
|
|
215
|
-
"output", type=
|
|
217
|
+
"output", type=Path, help="The name of the output Speedscope JSON file."
|
|
216
218
|
)
|
|
217
219
|
arg_parser.add_argument(
|
|
218
220
|
"--indent", type=int, help="Give a non-null value to prettify the JSON output."
|
|
@@ -223,24 +225,30 @@ def main() -> None:
|
|
|
223
225
|
args = arg_parser.parse_args()
|
|
224
226
|
|
|
225
227
|
try:
|
|
226
|
-
with
|
|
227
|
-
|
|
228
|
-
speedscope = Speedscope(os.path.basename(args.input), mode, args.indent)
|
|
228
|
+
with args.input.open() as austin, AustinFileReader(austin) as fin:
|
|
229
|
+
speedscope = None
|
|
229
230
|
for event in fin:
|
|
230
|
-
if
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
231
|
+
if isinstance(event, AustinMetadata):
|
|
232
|
+
if event.name == "mode":
|
|
233
|
+
speedscope = Speedscope(
|
|
234
|
+
os.path.basename(args.input), event.value, args.indent
|
|
235
|
+
)
|
|
236
|
+
elif isinstance(event, AustinSample):
|
|
237
|
+
if speedscope is not None:
|
|
238
|
+
speedscope.add_sample(event)
|
|
239
|
+
else:
|
|
240
|
+
raise ValueError("Invalid sample found in input file")
|
|
241
|
+
|
|
242
|
+
if speedscope is None:
|
|
243
|
+
raise RuntimeError("Invalid input file: no mode metadata found")
|
|
244
|
+
|
|
245
|
+
with args.output.open("w") as fout:
|
|
246
|
+
speedscope.dump(fout)
|
|
236
247
|
|
|
237
248
|
except FileNotFoundError:
|
|
238
249
|
print(f"No such input file: {args.input}")
|
|
239
250
|
exit(1)
|
|
240
251
|
|
|
241
|
-
with open(args.output, "w") as fout:
|
|
242
|
-
speedscope.dump(fout)
|
|
243
|
-
|
|
244
252
|
|
|
245
253
|
if __name__ == "__main__":
|
|
246
254
|
main()
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|