<div dir="ltr">There is example in official documentation showing graph generation without involving internal erlang tracing in tutorial <a href="http://www.erlang.org/doc/apps/et/et_tutorial.html">http://www.erlang.org/doc/apps/et/et_tutorial.html</a><div><br></div><div><div>-module(et_display_demo).</div><div><br></div><div>-export([test/0]).</div><div><br></div><div>test() -></div><div>    {ok, Viewer} = et_viewer:start([{title,"Coffee Order"}, {max_actors,10}]),</div><div>    Drink = {drink,iced_chai_latte},</div><div>    Size = {size,grande},</div><div>    Milk = {milk,whole},</div><div>    Flavor = {flavor,vanilla},</div><div>    C = et_viewer:get_collector_pid(Viewer),</div><div>    et_collector:report_event(C,99,customer,barrista1,place_order,[Drink,Size,Milk,Flavor]),</div><div>    et_collector:report_event(C,80,barrista1,register,enter_order,[Drink,Size,Flavor]),</div><div>    et_collector:report_event(C,80,register,barrista1,give_total,"$5"),</div><div>    et_collector:report_event(C,80,barrista1,barrista1,get_cup,[Drink,Size]),</div><div>    et_collector:report_event(C,80,barrista1,barrista2,give_cup,[]),</div><div>    et_collector:report_event(C,90,barrista1,customer,request_money,"$5"),</div><div>    et_collector:report_event(C,90,customer,barrista1,pay_money,"$5"),</div><div>    et_collector:report_event(C,80,barrista2,barrista2,get_chai_mix,[]),</div><div>    et_collector:report_event(C,80,barrista2,barrista2,add_flavor,[Flavor]),</div><div>    et_collector:report_event(C,80,barrista2,barrista2,add_milk,[Milk]),</div><div>    et_collector:report_event(C,80,barrista2,barrista2,add_ice,[]),</div><div>    et_collector:report_event(C,80,barrista2,barrista2,swirl,[]),</div><div>    et_collector:report_event(C,80,barrista2,customer,give_tasty_beverage,[Drink,Size]),</div><div>    ok.</div></div><div><br></div><div>I think it is a pretty descriptive demo.</div><div><br></div><div>Cheers!</div><div>H.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jul 24, 2015 at 12:46 PM, Fernando 'Brujo' Benavides <span dir="ltr"><<a href="mailto:fernando.benavides@inakanetworks.com" target="_blank">fernando.benavides@inakanetworks.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word">Based on that great example, and the easter egg I recently found (et:phone_home/4,5), I created this example module: <a href="https://github.com/elbrujohalcon/witchcraft/blob/master/src/ufo.erl" target="_blank">https://github.com/elbrujohalcon/witchcraft/blob/master/src/ufo.erl</a><div><br></div><div>To see it in action, do…</div><div>1> ufo:start().</div><div>2> ufo:run().</div><div><br></div><div>You will see stuff like this going around: <a href="http://g.recordit.co/9KvFR7FRqN.gif" target="_blank">http://g.recordit.co/9KvFR7FRqN.gif</a></div><div><br></div><div>Cheers!</div><div><div>
<div><table border="0" cellpadding="0" cellspacing="0" style="margin:0px;padding:0px;border:0px;outline:0px;font-size:14px;font-family:proxima-nova-1,proxima-nova-2,Tahoma,Helvetica,Verdana,sans-serif;vertical-align:baseline;border-spacing:0px;color:rgb(51,51,51);line-height:18.2000007629395px;background-color:rgb(255,255,255)"><tbody style="margin:0px;padding:0px;border:0px;outline:0px;font-style:inherit;font-family:inherit;vertical-align:baseline"><tr style="margin:0px;padding:0px;border:0px;outline:0px;font-style:inherit;font-family:inherit;vertical-align:baseline"><td style="margin:0px;padding:0px;border:0px;outline:0px;font-style:inherit;font-size:0px;font-family:inherit;vertical-align:baseline;width:auto;height:30px"> </td></tr><tr style="margin:0px;padding:0px;border:0px;outline:0px;font-style:inherit;font-family:inherit;vertical-align:baseline"><td style="margin:0px;padding:0px;border:0px;outline:0px;font-style:inherit;font-family:inherit;vertical-align:baseline;width:auto"><div style="margin:0px;padding:0px;border:0px;outline:0px;font-style:inherit;font-family:inherit;vertical-align:baseline;line-height:0"><a href="http://about.me/elbrujohalcon?promo=email_sig" style="margin:0px;padding:0px;border:0px;outline:0px;font-style:inherit;font-family:inherit;vertical-align:baseline;color:rgb(43,130,173);text-decoration:none;display:inline-block" target="_blank"><table border="0" cellpadding="0" cellspacing="0" style="margin:0px;padding:0px;border:0px;outline:0px;font-style:inherit;font-size:14px;font-family:inherit;vertical-align:baseline;border-spacing:0px"><tbody style="margin:0px;padding:0px;border:0px;outline:0px;font-style:inherit;font-family:inherit;vertical-align:baseline"><tr style="margin:0px;padding:0px;border:0px;outline:0px;font-style:inherit;font-family:inherit;vertical-align:baseline"><td align="left" valign="top" style="margin:0px;padding:0px;border:0px;outline:0px;font-style:inherit;font-family:inherit;vertical-align:top;width:auto;line-height:1"><img alt="--" width="0" height="0" style="margin:0px;padding:0px;border:0px;outline:0px;font-style:inherit;font-family:inherit;vertical-align:baseline;display:block;width:0px;min-height:0px;overflow:hidden"><span class="HOEnZb"><font color="#888888"><div style="margin:0px;padding:0px;border:0px;outline:0px;font-weight:bold;font-style:inherit;font-size:18px;font-family:proxima-nova-1,Proxima-Nova,Helvetica,Arial,sans-serif;vertical-align:baseline;line-height:1;color:rgb(51,51,51)">Fernando "Brujo" Benavides</div><div style="margin:3px 0px 0px;padding:0px;border:0px;outline:0px;font-style:inherit;font-size:12px;font-family:proxima-nova-1,Proxima-Nova,Helvetica,Arial,sans-serif;vertical-align:baseline;color:rgb(43,130,173)"><img alt="http://" width="0" height="0" style="margin:0px;padding:0px;border:0px;outline:0px;font-style:inherit;font-family:inherit;vertical-align:baseline;display:block;width:0px;min-height:0px;overflow:hidden">about.me/elbrujohalcon</div></font></span></td></tr><tr style="margin:0px;padding:0px;border:0px;outline:0px;font-style:inherit;font-family:inherit;vertical-align:baseline"><td align="left" valign="top" style="margin:0px;padding:8px 0px 0px;border:0px;outline:0px;font-style:inherit;font-family:inherit;vertical-align:top;width:auto;line-height:1"><div style="margin:0px;padding:0px;border:0px;outline:0px;font-style:inherit;font-family:inherit;vertical-align:baseline;text-align:right;min-height:4px;background-color:rgb(197,208,224)"><img src="http://d13pix9kaak6wt.cloudfront.net/signature/colorbar.png" alt="" width="88" height="4" style="margin:0px;padding:0px;border:0px;outline:0px;font-style:inherit;font-family:inherit;vertical-align:baseline;float:right;display:block"></div></td></tr></tbody></table></a>                                 </div></td></tr><tr style="margin:0px;padding:0px;border:0px;outline:0px;font-style:inherit;font-family:inherit;vertical-align:baseline"><td style="margin:0px;padding:0px;border:0px;outline:0px;font-style:inherit;font-size:0px;font-family:inherit;vertical-align:baseline;width:auto;height:20px"> </td></tr></tbody></table><div><br></div></div><br>
</div>
<br><div><blockquote type="cite"><div><div class="h5"><div>On Jul 24, 2015, at 06:13, Jesper Louis Andersen <<a href="mailto:jesper.louis.andersen@gmail.com" target="_blank">jesper.louis.andersen@gmail.com</a>> wrote:</div><br></div></div><div><div><div class="h5"><div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jul 24, 2015 at 9:54 AM, Leo Liu <span dir="ltr"><<a href="mailto:sdl.web@gmail.com" target="_blank">sdl.web@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I wonder how those graphs are generated? Thanks.</blockquote></div><br></div><div class="gmail_extra">I think those graphs are generated by a tool. Either manually, or automatically. The have many names, one of which is "Sequence Diagrams" and another one being "Message Sequence Chart (MSC)". Usually there is specific meaning attached to different shapes in them, but the general rule is that time flows downwards and you can see the interaction between several agents.<br><br></div><div class="gmail_extra">In Erlang, we have a tool for generating these, which is the `et` application (short for event tracer). It allows you to add dummy function calls into your application and then record what the application is doing, automatically generating a diagram for you. My post is somewhat old, but I still think it is applicable:<br><br><a href="http://jlouisramblings.blogspot.dk/2011/10/using-event-tracer-tool-set-in-erlang.html" target="_blank">http://jlouisramblings.blogspot.dk/2011/10/using-event-tracer-tool-set-in-erlang.html</a><br><br></div><div class="gmail_extra">That way, you can build diagrams automatically by attaching trace probes to the report_event function.<br><br></div><div class="gmail_extra"><br clear="all"><br>-- <br><div>J.</div>
</div></div></div></div><span class="">
_______________________________________________<br>erlang-questions mailing list<br><a href="mailto:erlang-questions@erlang.org" target="_blank">erlang-questions@erlang.org</a><br><a href="http://erlang.org/mailman/listinfo/erlang-questions" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a><br></span></div></blockquote></div><br></div></div><br>_______________________________________________<br>
erlang-questions mailing list<br>
<a href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a><br>
<a href="http://erlang.org/mailman/listinfo/erlang-questions" rel="noreferrer" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a><br>
<br></blockquote></div><br></div>