From 8c382412d1c219893ed62351bcd06320c2dcde4d Mon Sep 17 00:00:00 2001 From: Tian Gao Date: Wed, 20 Dec 2023 11:49:50 -0800 Subject: [PATCH] Update README.md --- README.md | 36 +++++++----------------------------- 1 file changed, 7 insertions(+), 29 deletions(-) diff --git a/README.md b/README.md index c2a46ed1..de58c1bf 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # VizTracer -[![build](https://github.com/gaogaotiantian/viztracer/workflows/build/badge.svg)](https://github.com/gaogaotiantian/viztracer/actions?query=workflow%3Abuild) [![flake8](https://github.com/gaogaotiantian/viztracer/workflows/lint/badge.svg)](https://github.com/gaogaotiantian/viztracer/actions?query=workflow%3ALint) [![readthedocs](https://img.shields.io/readthedocs/viztracer)](https://viztracer.readthedocs.io/en/stable/) [![coverage](https://img.shields.io/codecov/c/github/gaogaotiantian/viztracer)](https://codecov.io/gh/gaogaotiantian/viztracer) [![pypi](https://img.shields.io/pypi/v/viztracer.svg)](https://pypi.org/project/viztracer/) [![support-version](https://img.shields.io/pypi/pyversions/viztracer)](https://img.shields.io/pypi/pyversions/viztracer) [![license](https://img.shields.io/github/license/gaogaotiantian/viztracer)](https://github.com/gaogaotiantian/viztracer/blob/master/LICENSE) [![commit](https://img.shields.io/github/last-commit/gaogaotiantian/viztracer)](https://github.com/gaogaotiantian/viztracer/commits/master) [![sponsor](https://img.shields.io/badge/%E2%9D%A4-Sponsor%20me-%23c96198?style=flat&logo=GitHub)](https://github.com/sponsors/gaogaotiantian) +[![build](https://github.com/gaogaotiantian/viztracer/workflows/build/badge.svg)](https://github.com/gaogaotiantian/viztracer/actions?query=workflow%3Abuild) [![flake8](https://github.com/gaogaotiantian/viztracer/workflows/lint/badge.svg)](https://github.com/gaogaotiantian/viztracer/actions?query=workflow%3ALint) [![readthedocs](https://img.shields.io/readthedocs/viztracer)](https://viztracer.readthedocs.io/en/stable/) [![coverage](https://img.shields.io/codecov/c/github/gaogaotiantian/viztracer)](https://codecov.io/gh/gaogaotiantian/viztracer) [![pypi](https://img.shields.io/pypi/v/viztracer.svg)](https://pypi.org/project/viztracer/) [![Visual Studio Marketplace Version](https://img.shields.io/visual-studio-marketplace/v/gaogaotiantian.viztracer-vscode?logo=visual-studio)](https://marketplace.visualstudio.com/items?itemName=gaogaotiantian.viztracer-vscode) [![support-version](https://img.shields.io/pypi/pyversions/viztracer)](https://img.shields.io/pypi/pyversions/viztracer) [![license](https://img.shields.io/github/license/gaogaotiantian/viztracer)](https://github.com/gaogaotiantian/viztracer/blob/master/LICENSE) [![commit](https://img.shields.io/github/last-commit/gaogaotiantian/viztracer)](https://github.com/gaogaotiantian/viztracer/commits/master) [![sponsor](https://img.shields.io/badge/%E2%9D%A4-Sponsor%20me-%23c96198?style=flat&logo=GitHub)](https://github.com/sponsors/gaogaotiantian) VizTracer is a low-overhead logging/debugging/profiling tool that can trace and visualize your python code execution. @@ -15,7 +15,6 @@ More help can be found in "Support - Controls". * 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 @@ -74,37 +73,16 @@ vizviewer --use_external_processor result.json ``` A [VS Code Extension](https://marketplace.visualstudio.com/items?itemName=gaogaotiantian.viztracer-vscode) -is available to make your life even easier. You can open the corresponding source file in -VS Code from the trace report with the extension. +is available to make your life even easier. -
- - -You can also generate standalone html file - - -```sh -viztracer -o result.html my_script.py arg1 arg2 -``` - -The standalone HTML file is powered by [catapult](https://github.com/catapult-project/catapult) trace viewer which is an old tool Google made and is being replaced by [Perfetto](https://perfetto.dev/) gradually. - -Catapult trace viewer is sluggish with larger traces and is not actively maintained. It is recommended to use Perfetto instead. - -However, if you really need a standalone HTML file, this is the only option. Perfetto does not support standalone files. - -You can use vizviewer to open the html file as well, just to make the interface consistent - -```sh -vizviewer result.html -``` - -
+

+ +

-Or add --open to open the reports right after tracing +Add --open to open the reports right after tracing ```sh @@ -207,7 +185,7 @@ VizTracer supports inserting custom events while the program is running. This wo VizTracer supports python native ```threading``` module without the need to do any modification to your code. Just start ```VizTracer``` before you create threads and it will just work. -For other multi-thread scenarios, you can use ``enable_thread_tracing()`` to let VizTracer know about the thread to trace it. +For other multi-thread scenarios, you can use ``enable_thread_tracing()`` to notice VizTracer about the thread to trace it. [![example_img](https://github.com/gaogaotiantian/viztracer/blob/master/img/multithread_example.png)](https://github.com/gaogaotiantian/viztracer/blob/master/img/multithread_example.png)