linescope 0.1.0__py3-none-any.whl
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.
- linescope/__init__.py +62 -0
- linescope/api.py +937 -0
- linescope/backends/__init__.py +12 -0
- linescope/backends/base.py +231 -0
- linescope/backends/scalene.py +1164 -0
- linescope/backends/tachyon.py +543 -0
- linescope/backends/trace.py +572 -0
- linescope/cli.py +248 -0
- linescope/config.py +288 -0
- linescope/enums.py +176 -0
- linescope/memory.py +381 -0
- linescope/model.py +761 -0
- linescope/notebooks/__init__.py +21 -0
- linescope/notebooks/correlation.py +202 -0
- linescope/notebooks/databricks.py +416 -0
- linescope/notebooks/identity.py +183 -0
- linescope/notebooks/ipython.py +842 -0
- linescope/notebooks/remote.py +580 -0
- linescope/notebooks/serialization.py +195 -0
- linescope/notebooks/summary.py +219 -0
- linescope/render/__init__.py +10 -0
- linescope/render/assets/app.js +258 -0
- linescope/render/assets/cell-sort.js +35 -0
- linescope/render/assets/icon.svg +1 -0
- linescope/render/assets/styles.css +65 -0
- linescope/render/cell.py +383 -0
- linescope/render/html.py +3142 -0
- linescope/render/spark.py +428 -0
- linescope/source/__init__.py +11 -0
- linescope/source/discovery.py +449 -0
- linescope/source/symbols.py +1382 -0
- linescope/spark/__init__.py +11 -0
- linescope/spark/listener.py +1116 -0
- linescope/spark/metrics.py +328 -0
- linescope/spark/plans.py +209 -0
- linescope-0.1.0.dist-info/METADATA +255 -0
- linescope-0.1.0.dist-info/RECORD +40 -0
- linescope-0.1.0.dist-info/WHEEL +4 -0
- linescope-0.1.0.dist-info/entry_points.txt +3 -0
- linescope-0.1.0.dist-info/licenses/LICENSE +21 -0
linescope/__init__.py
ADDED
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
"""LineScope.
|
|
2
|
+
|
|
3
|
+
Author: Mavs
|
|
4
|
+
Description: Profile your own Python source, notebooks, and Spark driver
|
|
5
|
+
actions.
|
|
6
|
+
|
|
7
|
+
"""
|
|
8
|
+
|
|
9
|
+
from linescope.api import ProfileController, Session, profile, profiler
|
|
10
|
+
from linescope.backends import register_backend
|
|
11
|
+
from linescope.config import Config
|
|
12
|
+
from linescope.enums import (
|
|
13
|
+
Backend,
|
|
14
|
+
DisplayMode,
|
|
15
|
+
RunStatus,
|
|
16
|
+
SessionState,
|
|
17
|
+
SourceKind,
|
|
18
|
+
SymbolKind,
|
|
19
|
+
)
|
|
20
|
+
|
|
21
|
+
__version__ = "0.1.0"
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
def load_ipython_extension(shell):
|
|
25
|
+
"""Register the optional IPython cell magics when loading this extension.
|
|
26
|
+
|
|
27
|
+
Import the notebook integration only when IPython requests the extension.
|
|
28
|
+
|
|
29
|
+
"""
|
|
30
|
+
from linescope.notebooks.ipython import load_ipython_extension as load
|
|
31
|
+
|
|
32
|
+
load(shell)
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
def unload_ipython_extension(shell):
|
|
36
|
+
"""Restore IPython magics when unloading this extension.
|
|
37
|
+
|
|
38
|
+
Delegate cleanup to the integration that owns the installed hooks.
|
|
39
|
+
|
|
40
|
+
"""
|
|
41
|
+
from linescope.notebooks.ipython import unload_ipython_extension as unload
|
|
42
|
+
|
|
43
|
+
unload(shell)
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
__all__ = [
|
|
47
|
+
"Backend",
|
|
48
|
+
"Config",
|
|
49
|
+
"DisplayMode",
|
|
50
|
+
"ProfileController",
|
|
51
|
+
"RunStatus",
|
|
52
|
+
"Session",
|
|
53
|
+
"SessionState",
|
|
54
|
+
"SourceKind",
|
|
55
|
+
"SymbolKind",
|
|
56
|
+
"__version__",
|
|
57
|
+
"load_ipython_extension",
|
|
58
|
+
"profile",
|
|
59
|
+
"profiler",
|
|
60
|
+
"register_backend",
|
|
61
|
+
"unload_ipython_extension",
|
|
62
|
+
]
|