Skip to main content

Visualize and profile your python code with FlowVisor.

Project description


FlowVisor

Visualize the flow of your python code.


FlowVisor-Example



Installation

pip install FlowVisor

Usage

from FlowVisor import FlowVisor, vis

@vis # This will visualize the function in the flow
def my_function():
    print("Hello World")

@vis
def my_other_function():
    my_function()

my_other_function()
FlowVisor.CONFIG.output_file = "example_graph" # You can add some configureation with the CONFIG object
FlowVisor.graph() # Generate the graph
FlowVisor.export("example_flow", "json") # Save the flow as json

CLI

add-vis

Adds the vis decorator to all functions in all python files in a directory.

add-vis -p <path-to-dir>

remove-vis

Removes the vis decorator from all functions in all python files in a directory.

remove-vis -p <path-to-dir>

vis-file

Generate a graph from a exported flow file.

vis-file -f <path-to-flow-file>

Overhead

The overhead of the FlowVisor is tried to be kept as low as possible. The overhead is mainly caused by the decorator. Therefore the time for running the logic of the Flowvisor is excluded from the profiling.

You can even descrease the overhead by the advanced_ovhead_reduction:

FlowVisor.enable_advanced_overhead_reduction()

Development

git clone https://github.com/cophilot/FlowVisor
cd FlowVisor
pip install -r requirements.txt

Example

Run the example:

pip install -r requirements.txt
python example.py

by Philipp B.

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

FlowVisor-0.1.10.tar.gz (15.5 kB view hashes)

Uploaded Source

Built Distribution

FlowVisor-0.1.10-py3-none-any.whl (20.1 kB view hashes)

Uploaded Python 3

Supported by

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