Git Product home page Git Product logo

flowvisor's Introduction


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.

flowvisor's People

Contributors

cophilot avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.