gaogaotiantian/viztracer

A debugging and profiling tool that can trace and visualize python code execution

View on GitHub ↗Jump to charts ↓

Summary Information

Updated 8 minutes ago
Added to GitGenius on September 8th, 2026
Created on August 5th, 2020
Open Issues & Pull Requests: 32 (+0)
GitHub issues: Enabled
Number of forks: 475
Total Stargazers: 7,736 (+0)
Total Subscribers: 59 (+0)

Charts & Analytics

Fetching additional details & charts...

Issue Activity (beta)

Issue API getrepoissuespagesummary failed: 429 Rate limit exceeded. Please try again later.

Detailed Description

VizTracer is a low-overhead Python profiling and debugging tool that traces code execution and visualizes it interactively.

The tool addresses the need to understand program behavior and identify performance bottlenecks without modifying source code or adding dependencies. It works by instrumenting Python function calls to capture entry and exit events with timing information, then renders this data on a timeline powered by Perfetto, a browser-based visualization engine. The interface supports navigation and zooming to explore execution traces ranging from small programs to gigabyte-scale recordings. VizTracer handles threading, multiprocessing, subprocess calls, async code, and PyTorch profiling, including native calls and GPU events when enabled.

Developers should choose VizTracer if they need fast, detailed execution traces without code instrumentation. It suits projects where understanding call sequences and timing is critical—particularly those involving concurrency or GPU computation. The tool works across Linux, macOS, and Windows. A VS Code extension is available to streamline the workflow. The command-line interface generates JSON trace files viewable through a web server, while inline usage and Jupyter integration support interactive development. Trace filtering options let you reduce overhead by excluding specific files, limiting stack depth, or filtering by minimum duration.

The project shows consistent maintenance with regular updates addressing user-reported issues and feature requests. Development includes responsiveness to bug reports and incorporation of community feedback into new releases. The maintainer actively documents features and maintains comprehensive documentation covering both basic and advanced usage patterns. The codebase receives ongoing refinement to improve performance and expand platform support.