functiontrace 0.3.6__tar.gz → 0.3.10__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.
- {functiontrace-0.3.6/functiontrace.egg-info → functiontrace-0.3.10}/PKG-INFO +8 -6
- {functiontrace-0.3.6 → functiontrace-0.3.10}/_functiontrace.c +16 -2
- {functiontrace-0.3.6 → functiontrace-0.3.10/functiontrace.egg-info}/PKG-INFO +8 -6
- {functiontrace-0.3.6 → functiontrace-0.3.10}/functiontrace.egg-info/SOURCES.txt +1 -2
- {functiontrace-0.3.6 → functiontrace-0.3.10}/functiontrace.egg-info/entry_points.txt +3 -0
- {functiontrace-0.3.6 → functiontrace-0.3.10}/functiontrace.py +16 -5
- functiontrace-0.3.10/pyproject.toml +45 -0
- functiontrace-0.3.10/setup.cfg +4 -0
- {functiontrace-0.3.6 → functiontrace-0.3.10}/setup.py +8 -8
- functiontrace-0.3.6/functiontrace.egg-info/not-zip-safe +0 -1
- functiontrace-0.3.6/setup.cfg +0 -30
- {functiontrace-0.3.6 → functiontrace-0.3.10}/MANIFEST.in +0 -0
- {functiontrace-0.3.6 → functiontrace-0.3.10}/README.rst +0 -0
- {functiontrace-0.3.6 → functiontrace-0.3.10}/functiontrace.egg-info/dependency_links.txt +0 -0
- {functiontrace-0.3.6 → functiontrace-0.3.10}/functiontrace.egg-info/top_level.txt +0 -0
- {functiontrace-0.3.6 → functiontrace-0.3.10}/mpack/LICENSE +0 -0
- {functiontrace-0.3.6 → functiontrace-0.3.10}/mpack/mpack.c +0 -0
- {functiontrace-0.3.6 → functiontrace-0.3.10}/mpack/mpack.h +0 -0
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: functiontrace
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.10
|
|
4
4
|
Summary: A profiling tool that traces your application's execution
|
|
5
|
-
|
|
6
|
-
Author: Matt Bryant
|
|
7
|
-
Author-email: functiontrace@programsareproofs.com
|
|
5
|
+
Author: Alistair Dobke
|
|
6
|
+
Author-email: Matt Bryant <functiontrace@programsareproofs.com>
|
|
8
7
|
License: The Prosperity Public License 3.0.0
|
|
8
|
+
Project-URL: homepage, https://functiontrace.com
|
|
9
|
+
Project-URL: repository, https://gitlab.com/mbryant/functiontrace
|
|
9
10
|
Keywords: profiler,debugger
|
|
10
|
-
Platform: Unix
|
|
11
11
|
Classifier: Intended Audience :: Developers
|
|
12
12
|
Classifier: Topic :: Software Development :: Debuggers
|
|
13
13
|
Classifier: License :: Free for non-commercial use
|
|
@@ -16,6 +16,8 @@ Classifier: Environment :: Console
|
|
|
16
16
|
Classifier: Programming Language :: Python :: 3
|
|
17
17
|
Classifier: Programming Language :: Python :: 3 :: Only
|
|
18
18
|
Classifier: Programming Language :: Python :: Implementation :: CPython
|
|
19
|
+
Requires-Python: >=3.7
|
|
20
|
+
Description-Content-Type: text/x-rst
|
|
19
21
|
|
|
20
22
|
Py-Functiontrace
|
|
21
23
|
================
|
|
@@ -761,7 +761,14 @@ PyMODINIT_FUNC PyInit__functiontrace(void) {
|
|
|
761
761
|
exit(-1);
|
|
762
762
|
}
|
|
763
763
|
|
|
764
|
-
|
|
764
|
+
|
|
765
|
+
PyObject* m = PyModule_Create(&module);
|
|
766
|
+
if (PyModule_AddStringConstant(m, "__version__", PACKAGE_VERSION) == -1) {
|
|
767
|
+
Py_XDECREF(m);
|
|
768
|
+
m = NULL;
|
|
769
|
+
}
|
|
770
|
+
|
|
771
|
+
return m;
|
|
765
772
|
}
|
|
766
773
|
|
|
767
774
|
// Start tracing.
|
|
@@ -797,6 +804,14 @@ static PyObject* Fprofile_StartTrace(PyObject* obj, PyObject* args, PyObject* kw
|
|
|
797
804
|
}
|
|
798
805
|
}
|
|
799
806
|
|
|
807
|
+
if (moduleConfiguration.pid != 0) {
|
|
808
|
+
// This can be triggered by running `functiontrace.begin_tracing()`
|
|
809
|
+
// from inside a process that's already being traced.
|
|
810
|
+
// We'll fail in this situation, but might as well print a mildly
|
|
811
|
+
// helpful error message here.
|
|
812
|
+
perror("Functiontrace doubly initialized! Aborting.");
|
|
813
|
+
exit(-1);
|
|
814
|
+
}
|
|
800
815
|
moduleConfiguration.pid = getpid();
|
|
801
816
|
|
|
802
817
|
// Mark that we'll need to forget some information on forks. In
|
|
@@ -1092,4 +1107,3 @@ static void Fprofile_ResetThreadState(void) {
|
|
|
1092
1107
|
moduleConfiguration.pid = getpid();
|
|
1093
1108
|
Fprofile_CreateThreadState();
|
|
1094
1109
|
}
|
|
1095
|
-
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: functiontrace
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.10
|
|
4
4
|
Summary: A profiling tool that traces your application's execution
|
|
5
|
-
|
|
6
|
-
Author: Matt Bryant
|
|
7
|
-
Author-email: functiontrace@programsareproofs.com
|
|
5
|
+
Author: Alistair Dobke
|
|
6
|
+
Author-email: Matt Bryant <functiontrace@programsareproofs.com>
|
|
8
7
|
License: The Prosperity Public License 3.0.0
|
|
8
|
+
Project-URL: homepage, https://functiontrace.com
|
|
9
|
+
Project-URL: repository, https://gitlab.com/mbryant/functiontrace
|
|
9
10
|
Keywords: profiler,debugger
|
|
10
|
-
Platform: Unix
|
|
11
11
|
Classifier: Intended Audience :: Developers
|
|
12
12
|
Classifier: Topic :: Software Development :: Debuggers
|
|
13
13
|
Classifier: License :: Free for non-commercial use
|
|
@@ -16,6 +16,8 @@ Classifier: Environment :: Console
|
|
|
16
16
|
Classifier: Programming Language :: Python :: 3
|
|
17
17
|
Classifier: Programming Language :: Python :: 3 :: Only
|
|
18
18
|
Classifier: Programming Language :: Python :: Implementation :: CPython
|
|
19
|
+
Requires-Python: >=3.7
|
|
20
|
+
Description-Content-Type: text/x-rst
|
|
19
21
|
|
|
20
22
|
Py-Functiontrace
|
|
21
23
|
================
|
|
@@ -2,13 +2,12 @@ MANIFEST.in
|
|
|
2
2
|
README.rst
|
|
3
3
|
_functiontrace.c
|
|
4
4
|
functiontrace.py
|
|
5
|
-
|
|
5
|
+
pyproject.toml
|
|
6
6
|
setup.py
|
|
7
7
|
functiontrace.egg-info/PKG-INFO
|
|
8
8
|
functiontrace.egg-info/SOURCES.txt
|
|
9
9
|
functiontrace.egg-info/dependency_links.txt
|
|
10
10
|
functiontrace.egg-info/entry_points.txt
|
|
11
|
-
functiontrace.egg-info/not-zip-safe
|
|
12
11
|
functiontrace.egg-info/top_level.txt
|
|
13
12
|
mpack/LICENSE
|
|
14
13
|
mpack/mpack.c
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import argparse
|
|
2
|
-
from importlib import util, machinery
|
|
3
2
|
import os
|
|
4
3
|
import shutil
|
|
5
4
|
import sys
|
|
6
5
|
import tempfile
|
|
6
|
+
from importlib import machinery, util
|
|
7
7
|
|
|
8
8
|
import _functiontrace
|
|
9
9
|
|
|
@@ -40,7 +40,9 @@ def setup_dependencies():
|
|
|
40
40
|
|
|
41
41
|
# Generate wrappers for the various Python versions we support to ensure
|
|
42
42
|
# they're included in our PATH.
|
|
43
|
-
wrap_pythons = ["python", "python3"] + [
|
|
43
|
+
wrap_pythons = ["python", "python3"] + [
|
|
44
|
+
"python3.{}".format(minor) for minor in range(6, 13)
|
|
45
|
+
]
|
|
44
46
|
for python in wrap_pythons:
|
|
45
47
|
with open(os.path.join(tempdir, python), "w") as f:
|
|
46
48
|
f.write(PYTHON_TEMPLATE.format(python=python))
|
|
@@ -53,9 +55,7 @@ def main():
|
|
|
53
55
|
"--trace-memory",
|
|
54
56
|
"--trace_memory",
|
|
55
57
|
action="store_true",
|
|
56
|
-
help=""
|
|
57
|
-
memory allocations/frees when enabled. This may add
|
|
58
|
-
tracing overhead, so is disabled by default.""",
|
|
58
|
+
help="Trace memory allocations/frees when enabled. This may add tracing overhead, so is disabled by default.",
|
|
59
59
|
)
|
|
60
60
|
parser.add_argument(
|
|
61
61
|
"--output-dir",
|
|
@@ -64,6 +64,15 @@ def main():
|
|
|
64
64
|
default=os.getcwd(),
|
|
65
65
|
help="The directory to output trace files to",
|
|
66
66
|
)
|
|
67
|
+
parser.add_argument(
|
|
68
|
+
"--no-compression",
|
|
69
|
+
"--no_compression",
|
|
70
|
+
action="store_true",
|
|
71
|
+
help="Disable compression of traces, which can be unnecessarily slow if filesize is not a concern.",
|
|
72
|
+
)
|
|
73
|
+
parser.add_argument(
|
|
74
|
+
"-v", "--version", action="version", version=_functiontrace.__version__
|
|
75
|
+
)
|
|
67
76
|
parser.add_argument("script", nargs=argparse.REMAINDER)
|
|
68
77
|
args = parser.parse_args()
|
|
69
78
|
|
|
@@ -102,6 +111,8 @@ def main():
|
|
|
102
111
|
setup_dependencies()
|
|
103
112
|
|
|
104
113
|
# Setup our tracing environment, including configuring tracing features.
|
|
114
|
+
if args.no_compression:
|
|
115
|
+
os.environ["FUNCTIONTRACE_COMPRESSION"] = "false"
|
|
105
116
|
if args.trace_memory:
|
|
106
117
|
_functiontrace.config_tracememory()
|
|
107
118
|
_functiontrace.begin_tracing(args.output_dir)
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
[project]
|
|
2
|
+
name = "functiontrace"
|
|
3
|
+
version = "0.3.10"
|
|
4
|
+
description = "A profiling tool that traces your application's execution"
|
|
5
|
+
authors = [
|
|
6
|
+
{ name = "Matt Bryant", email = "functiontrace@programsareproofs.com"},
|
|
7
|
+
{ name = "Alistair Dobke" }
|
|
8
|
+
]
|
|
9
|
+
license = { text = "The Prosperity Public License 3.0.0" }
|
|
10
|
+
readme = "README.rst"
|
|
11
|
+
# NOTE: Actively tested on Python 3.7 - 3.12 and may plausibly break on greater
|
|
12
|
+
# versions due to C extension hacks. However, setting a maximum version causes
|
|
13
|
+
# new Python versions to simply install very old versions of Functiontrace that
|
|
14
|
+
# didn't have the `requires-python` annotation on them and are also unlikely to
|
|
15
|
+
# work. Best to only set the minimum and let bug reports notify us of issues
|
|
16
|
+
# with new Python releases.
|
|
17
|
+
requires-python = ">=3.7"
|
|
18
|
+
keywords = [
|
|
19
|
+
"profiler",
|
|
20
|
+
"debugger"
|
|
21
|
+
]
|
|
22
|
+
classifiers = [
|
|
23
|
+
"Intended Audience :: Developers",
|
|
24
|
+
"Topic :: Software Development :: Debuggers",
|
|
25
|
+
"License :: Free for non-commercial use",
|
|
26
|
+
"Operating System :: Unix",
|
|
27
|
+
"Environment :: Console",
|
|
28
|
+
"Programming Language :: Python :: 3",
|
|
29
|
+
"Programming Language :: Python :: 3 :: Only",
|
|
30
|
+
"Programming Language :: Python :: Implementation :: CPython",
|
|
31
|
+
]
|
|
32
|
+
|
|
33
|
+
[project.urls]
|
|
34
|
+
homepage = "https://functiontrace.com"
|
|
35
|
+
repository = "https://gitlab.com/mbryant/functiontrace"
|
|
36
|
+
|
|
37
|
+
[project.scripts]
|
|
38
|
+
functiontrace = "functiontrace:main"
|
|
39
|
+
|
|
40
|
+
[project.entry-points.functiontrace]
|
|
41
|
+
functiontrace = "functiontrace"
|
|
42
|
+
|
|
43
|
+
[build-system]
|
|
44
|
+
requires = ["setuptools", "toml"]
|
|
45
|
+
build-backend = "setuptools.build_meta"
|
|
@@ -1,11 +1,16 @@
|
|
|
1
1
|
from setuptools import setup, Extension
|
|
2
|
+
import toml
|
|
2
3
|
|
|
3
4
|
|
|
4
|
-
|
|
5
|
-
|
|
5
|
+
if __name__ == "__main__":
|
|
6
|
+
with open("pyproject.toml") as meta:
|
|
7
|
+
pyproject = toml.loads(meta.read())["project"]
|
|
8
|
+
|
|
9
|
+
version = pyproject["version"]
|
|
10
|
+
|
|
6
11
|
setup(
|
|
7
12
|
version=version,
|
|
8
|
-
py_modules=["
|
|
13
|
+
py_modules=[pyproject["name"]],
|
|
9
14
|
ext_modules=[
|
|
10
15
|
Extension(
|
|
11
16
|
"_functiontrace",
|
|
@@ -14,9 +19,4 @@ def main():
|
|
|
14
19
|
define_macros=[("PACKAGE_VERSION", '"{}"'.format(version))],
|
|
15
20
|
)
|
|
16
21
|
],
|
|
17
|
-
entry_points={"console_scripts": ["functiontrace=functiontrace:main"]},
|
|
18
22
|
)
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
if __name__ == "__main__":
|
|
22
|
-
main()
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
|
functiontrace-0.3.6/setup.cfg
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
[metadata]
|
|
2
|
-
name = functiontrace
|
|
3
|
-
description = A profiling tool that traces your application's execution
|
|
4
|
-
long_description = file: README.rst
|
|
5
|
-
keywords = profiler, debugger
|
|
6
|
-
license = The Prosperity Public License 3.0.0
|
|
7
|
-
url = https://functiontrace.com
|
|
8
|
-
author = Matt Bryant, Alistair Dobke
|
|
9
|
-
author_email = functiontrace@programsareproofs.com
|
|
10
|
-
platform = Unix
|
|
11
|
-
classifiers =
|
|
12
|
-
Intended Audience :: Developers
|
|
13
|
-
Topic :: Software Development :: Debuggers
|
|
14
|
-
License :: Free for non-commercial use
|
|
15
|
-
Operating System :: Unix
|
|
16
|
-
Environment :: Console
|
|
17
|
-
Programming Language :: Python :: 3
|
|
18
|
-
Programming Language :: Python :: 3 :: Only
|
|
19
|
-
Programming Language :: Python :: Implementation :: CPython
|
|
20
|
-
|
|
21
|
-
[options]
|
|
22
|
-
zip_safe = False
|
|
23
|
-
|
|
24
|
-
[bdist_wheel]
|
|
25
|
-
universal = 0
|
|
26
|
-
|
|
27
|
-
[egg_info]
|
|
28
|
-
tag_build =
|
|
29
|
-
tag_date = 0
|
|
30
|
-
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|