首页 > 编程语言 >Python分析调试神器VizTracer

Python分析调试神器VizTracer

时间:2023-07-25 12:14:21浏览次数:38  
标签:code trace Python VizTracer python 神器 source

 

VizTracer 是一个这样的工具,它通过跟踪和可视化 Python 代码的执行过程,来帮助你对代码的理解。无需对源代码进行任何更改,VizTracer 即可记录函数的入口 / 出口,函数参数 / 返回值以及任意变量,然后通过 Trace-Viewer 使用直观的谷歌前端界面来显示数据。

VizTracer is a low-overhead logging/debugging/profiling tool that can trace and visualize your python code execution.

The front-end UI is powered by Perfetto. Use "AWSD" to zoom/navigate. More help can be found in "Support - Controls".

Highlights

  • Detailed function entry/exit information on timeline with source code
  • Super easy to use, no source code change for most features, no package dependency
  • Supports threading, multiprocessing, subprocess and async
  • Logs arbitrary function/variable using RegEx without code change
  • Powerful front-end, able to render GB-level trace smoothly
  • Works on Linux/MacOS/Windows

gaogaotiantian/viztracer: VizTracer is a low-overhead logging/debugging/profiling tool that can trace and visualize your python code execution. (github.com)

 

 

 

标签:code,trace,Python,VizTracer,python,神器,source
From: https://www.cnblogs.com/sinferwu/p/17579542.html

相关文章

  • 想知道python是什么,Python可以做什么呢?
    ​ python可以在数据爬虫、Web开发、人工智能开发、自动化运维和数据分析数据等领域进行应用。而且Python是跨平台语言,语法很简洁,对初学者十分友好。Python的应用用途:1、数据爬虫Python语言非常适合爬虫,通过requests库抓取网页数据,使用BeautifulSoup解析网页并清晰和组......
  • python for 跳出循环
    (99条消息)Python中跳出循环的两种方法_python跳出循环_在线码BUG的博客-CSDN博客#结束本次循环,继续下次循环foriinrange(1,10):ifi==3:continueelse:print('循环了',i,'次')#结束for循环foriinrange(1,10):ifi==3:br......
  • 【python】删除字符串中以\x开头的特殊字符
    1、场景  paramiko获取的字符串中有很多\x开头的字符,需要去除,获取原始输出  2、处理方法content="\x071cd\0x70"#使用unicode-escape编码集,将unicode内存编码值直接存储,并替换空白字符content=content.encode('unicode_escape').decode('utf-8').replace('','......
  • python数据分析项目有趣 新零售-无人智能售货机商务数据分析
        嗨喽!大家好,我是“流水不争先,争得滔滔不绝”的翀,18双非本科生一枚,正在努力!欢迎大家来交流学习,一起学习数据分析,希望我们一起好好学习,天天向上,目前是小社畜一枚~~项目名称新零售无人智能售货机1.数据探索1.1数据读取1.2设备编号1.3订单编号1.4支付状态1.5收款方2.......
  • 【python】unicode转中文
    1、处理方法text=u'\xe9\x95\xbf\xe5\x9f\x8e'text=text.encode('unicode-escape').decode('string_escape')print(text.decode('utf8')) 参考链接:(90条消息)python中unicode原样转成str,unicode-escape与string_escape_".......
  • Python随机函数random使用详解
    在python中用于生成随机数的模块是random,在使用前需要import,下面看下它的用法。random.randomrandom.random()用于生成一个0到1的随机符点数:0<=n<1.0注意: 以下代码在Python3.5下测试通过,python2版本可稍加修改描述random()方法返回随机生成的一个实数,它在(0,1)范围内。......
  • python flask 后台运行 关闭终端不退出
    方法一:$sudonohuppythonapp1c.py>log.txt2>&1&nohup允许运行从shell注销后可以在后台继续运行的命令/进程或shell脚本。log.txt:它将输出转发到该文件。2>&1:将所有标准错误移至标准输出。&:允许您在当前shell的后台运行命令/进程。方法二:uWsgi+......
  • Python - String Methodology
    >>>dir("")['__add__','__class__','__contains__','__delattr__','__dir__','__doc__','__eq__','__format__','__ge__','__getattribute__&......
  • 详解Python图像处理Pillow库
    在Python的图像处理领域,Pillow是一个强大而广泛使用的第三方库。它提供了丰富的图像处理功能,包括打开、保存、调整大小、裁剪、旋转等操作。本文将详细介绍Pillow库的使用方法,并通过代码示例进行讲解,帮助你理解和应用Pillow库进行图像处理。一、安装和导入Pillow库在使用Pillo......
  • GDAL-Python将s57数据转换为GeoJSON
    fromosgeoimportogrimportsubprocessimportglobimportosOGR_S57_OPTIONS="SPLIT_MULTIPOINT=ON,ADD_SOUNDG_DEPTH=ON"defGetAllS57Repertory():S57Path=[]for_fileinglob.glob(('{0}{1}*.000').format(path,os.sep)):......