High-performance Python profiler that generates interactive call tree visualizations to identify execution bottlenecks.
Project description
🔥 TraceForest
High-performance Python profiler that generates interactive call tree visualizations to identify execution bottlenecks.
TraceForest is a blazing-fast Python profiler that captures function calls in real-time and presents them as beautiful, interactive tree visualizations. Perfect for identifying performance bottlenecks and understanding code execution flow.
✨ Features
- 🚀 Real-time profiling - Captures function calls as they happen
- 🌳 Interactive trees - Beautiful hierarchical visualizations
- 🎨 Modern web interface - Clean, responsive design with dark theme
- 📊 Detailed metrics - Precise timing information for each function
- 🔍 Deep call analysis - See the complete execution path
- 💾 Persistent storage - Save and share profiling sessions
- 🎯 Zero configuration - Start profiling with just a few lines of code
🚀 Quick Start
Installation
pip install traceforest
Basic Usage
from traceforest import Profiler
# Create profiler instance
profiler = Profiler()
# Start profiling
profiler.start()
# Your code here
def slow_function():
import time
time.sleep(1)
return "done"
result = slow_function()
# Stop profiling and view results
profiler.stop()
profiler.export()
Web Visualization
After running export(), TraceForest will:
- Generate a unique profiling session
- Open your browser to view the interactive tree
📖 Detailed Usage
Profiling Classes and Methods
from traceforest import Profiler
class MyClass:
def method_a(self):
time.sleep(0.5)
self.method_b()
def method_b(self):
time.sleep(0.2)
profiler = Profiler()
profiler.start()
obj = MyClass()
obj.method_a()
profiler.stop()
profiler.export()
🎨 Web Interface
The web interface provides:
- Interactive tree navigation - Click to expand/collapse branches
- Visual performance bars - See relative execution times at a glance
- Detailed timing information - Precise millisecond measurements
🤝 Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
📝 License
This project is licensed under the MIT License - see the LICENSE file for details.
Made with 🔥 by developers, for developers
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file traceforest-0.1.0.tar.gz.
File metadata
- Download URL: traceforest-0.1.0.tar.gz
- Upload date:
- Size: 3.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.1.4 CPython/3.10.14 Linux/5.15.0-113-generic
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
26eada07aba1d49791416f50c84acf4005c54aef872bde374cc38e6f4e8c0816
|
|
| MD5 |
da85037fa6fc2f3c05d979158dc589a0
|
|
| BLAKE2b-256 |
14e69a2d6890c12d95ef2ca0c0c50555b3bc1f701b558fa7ffded07a7825d602
|
File details
Details for the file traceforest-0.1.0-py3-none-any.whl.
File metadata
- Download URL: traceforest-0.1.0-py3-none-any.whl
- Upload date:
- Size: 6.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.1.4 CPython/3.10.14 Linux/5.15.0-113-generic
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ef6db49395563d5a4ab75984a5faa304e5fd92dba7f8fe53553dce5acd9e635d
|
|
| MD5 |
f7dba793b5039e28ea24722eba466611
|
|
| BLAKE2b-256 |
0d9c33e16dfa792c349f18f941ac580ea04798837b5bc6d40cb95846254f97ff
|