Skip to main content

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.

Python Version License

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:

  1. Generate a unique profiling session
  2. 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.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

License

This project is licensed under the MIT License - see the LICENSE file for details.

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

traceforest-0.1.3.tar.gz (3.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

traceforest-0.1.3-py3-none-any.whl (5.9 kB view details)

Uploaded Python 3

File details

Details for the file traceforest-0.1.3.tar.gz.

File metadata

  • Download URL: traceforest-0.1.3.tar.gz
  • Upload date:
  • Size: 3.4 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

Hashes for traceforest-0.1.3.tar.gz
Algorithm Hash digest
SHA256 ae08ff9d7ca2808ca3b1f008b6c1907e88355475af3b7dba9053916fff2f5c4d
MD5 faedce3db9053166159d4e78c8e17bda
BLAKE2b-256 d5c6e9f2b29842f66fb461d4c820a4d6569e598a16d4e9e32097e110ea21437f

See more details on using hashes here.

File details

Details for the file traceforest-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: traceforest-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 5.9 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

Hashes for traceforest-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 886aa8509ca1031b535c50980e71402ed488bb3a11d9371507544fd89972ca6a
MD5 f049f9cf63e12c8875cdbb6762101bc2
BLAKE2b-256 e2bfdd644c8d73cf29cd1ab4e794ea030fe7208ea06bf1b5eaf084bff14b5585

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page