Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

Hot-diagnose: Python代码运行时诊断工具

hot-diagnose是Python程序运行时诊断工具,也是唯一能够做到实时代码分析功能。它具有以下特点:

  • 运行时诊断(Runtime Diagnose): 它可以根据不同运行参数、上下文环境,动态诊断Python程序运行效果。同时, 由于Python的动态语言特性,该工具可以在程序运行时实时分析程序状态,更新诊断结果。

  • 插件化(Plug-in Support): 该工具通过插件的方式提供大部分业务功能。用户也可以通过API实现自己的诊断工具。

  • 无第三方依赖(No thrid-party dependency): 为了提高项目可维护性,最大发挥性能,该工具主体部分不依赖任何第三方包, 渲染依赖少量的JS包。

安装

目前该工具已上传pypi,可以通过pip安装该工具。同样也可以使用conda、pdm等方式:

pip install hot-diagnose

此外,也可以通过``setup.py``直接安装:

python setup.py install

使用

基础

hot-diagnose既支持Python脚本诊断,也支持Python包诊断。在诊断Python包时需要确定``PYTHONPATH``。 比如诊断Python脚本:

python -m diagnose -s script.py args1 args2

诊断Python包:

python -m diagnose -s package_entrance.py -p pythonpath args1 args2

更多详细的运行参数可以通过运行以下代码获得:

python -m diagnose -h

执行完毕后,hot-diagnose会自动弹出HTML页面展示诊断过程和结果。

诊断脚本:

./docs/img/scripts.gif

诊断包:

./docs/img/packages.gif

以上展示的是不包含任何插件的运行截图,通过插件可以实现代码覆盖率统计、Trace统计、Stack Frame统计等。

高级

hot-diagnose提供后端和前端两部分API为用户提供插件编写的接口

(未完待续)

贡献

(未完待续)

Metadata

Release files for hot-diagnose 0.1rc0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for hot-diagnose 0.1rc0
File Size Uploaded Provenance
hot-diagnose-0.1rc0.tar.gz 66.3 kB Without provenance Details

Release files / hot-diagnose-0.1rc0.tar.gz

Download URL hot-diagnose-0.1rc0.tar.gz
Size 66.3 kB
Tags Source
SHA-256 checksum
How to use checksums
8266ce7d9b22903cac791712a7f4a9063d060818c3085f90016be081a61c9bb5
BLAKE2b-256 checksum
How to use checksums
86c1226e460f24ff3c63121ad889d3778f6dacba71c59dd4f26e0496112aa56b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.4

Security for hot-diagnose 0.1rc0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page