Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide an example graph #8

Open
fenollp opened this issue Apr 9, 2019 · 4 comments
Open

Provide an example graph #8

fenollp opened this issue Apr 9, 2019 · 4 comments

Comments

@fenollp
Copy link

fenollp commented Apr 9, 2019

I was trying to compare your project to https://github.com/clanchun/ecg
But this one doesn't have an example DOT (usable with http://viz-js.com/) or SVG or PNG file.

It builds fine though but this command just prints help:

./grapherl -a grapherl . grapherl.dot
@eproxus
Copy link
Owner

eproxus commented Apr 10, 2019

Hi! Are you asking for an example of how to use the command line script, or do you want to see an example image generated from grapherl?

@eproxus
Copy link
Owner

eproxus commented Apr 10, 2019

The correct command line would be ./grapherl -a . grapherl.png since -a doesn't take any arguments, it just defines what should be graphed (module graph or application graph). However, this produces an empty graph since it's only one application (needs to be fixed). To get the module graph the following should work:

$ ./grapherl -m . grapherl.png

This will produce:

grapherl

When used with -a to get an application graph the SOURCE path should be a lib directory of a release or a build (for example, a _build/default/lib folder in a Rebar 3 project). When used with -m to get a module graph it should be an ebin folder (for example, _build/default/lib/myproject in a Rebar 3 project).

@eproxus
Copy link
Owner

eproxus commented Apr 10, 2019

Also, there's the undocumented include_otp Erlang option which gives this when running on OTP 21.3:
grapherl

;-)

I started a 2.0 branch where this option is added to the command line.

@fenollp
Copy link
Author

fenollp commented Apr 10, 2019

Nice! I'll check it out maybe even make a rebar3_graph plugin ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants