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.
Metadata
Release files for traceforest 0.1.7
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| traceforest-0.1.7.tar.gz | 3.6 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| traceforest-0.1.7-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 9.7 kB
Release files / traceforest-0.1.7.tar.gz
| Download URL | traceforest-0.1.7.tar.gz |
|---|---|
| Size | 3.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d92e3d50df13b24f85bc31db070fc1a37c3385050955c7d83896298cd3ab1234
|
|
BLAKE2b-256 checksum How to use checksums |
d1674a3431fdd9da70b38bb175e85d0c540320ace012e9ccd11e7d00dd4bb05d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.1.1 CPython/3.12.0 Linux/6.8.0-85-generic
|
Release files / traceforest-0.1.7-py3-none-any.whl
| Download URL | traceforest-0.1.7-py3-none-any.whl |
|---|---|
| Size | 6.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6d66c2d1d0d699e39e75564adaa5cb1e4ae37c08d94a94325dd649062c4bb696
|
|
BLAKE2b-256 checksum How to use checksums |
39daac34ed00f824ca13bfa529591e986c0195edcd2a6d42c282750d397b1225
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.1.1 CPython/3.12.0 Linux/6.8.0-85-generic
|
Security for traceforest 0.1.7
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.