Skip to content

Create visualizations of Erlang message passing with graphviz

License

Notifications You must be signed in to change notification settings

davidw/tracemap

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TraceMap

TraceMap attempts to make a map of messages passed between processes.

Currently, it works, but could be expanded and improved and made more solid.

Don't run it on a production system!

Usage

In Erlang:

tracemap:map(ranch).

... time passes, and a few http requests are made ...

%% Make a graphviz file:
tracemap:graphviz("trace.dot").
%% Make a js-sequence-diagrams file
tracemap:sequence_js("seq.txt").

... you're done tracing things ...

tracemap:stop().

From the shell:

neato trace.dot -Tpng > trace.png

# Or whatever other image viewer you prefer:
eog trace.png

To make the sequence diagram work, you'll need to include the output of the file sequence_js creates in an HTML file. See the gallery/ directory for examples.

Gallery

Example images: http://davidw.github.io/tracemap/

Ideas

  • Parse OTP style messages to get more information about who is sending what where.

  • Live display via the web/javascript.

  • Make the code safe for a production system by limiting the amount of tracing done.

  • Permit tracing of multiple applications.

  • As an application adds children, start tracing them.

About

Create visualizations of Erlang message passing with graphviz

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published