aboutsummaryrefslogtreecommitdiffstats
path: root/lib/et/examples/et_display_demo.erl
diff options
context:
space:
mode:
authorHÃ¥kan Mattsson <[email protected]>2010-02-03 08:59:06 +0000
committerErlang/OTP <[email protected]>2010-02-03 08:59:06 +0000
commit43f3482adf5eee657e5ba922733dfff6600c4e14 (patch)
tree7ea7b32a171de1a7690102c403a8a946e8a382a8 /lib/et/examples/et_display_demo.erl
parent768da5a5f6312496b9b8a09cca5ea1d6b89a2c1c (diff)
downloadotp-43f3482adf5eee657e5ba922733dfff6600c4e14.tar.gz
otp-43f3482adf5eee657e5ba922733dfff6600c4e14.tar.bz2
otp-43f3482adf5eee657e5ba922733dfff6600c4e14.zip
OTP-8058 The GUI parts are rewritten to use wxWidgets. Thanks Olle
Mattsson! For the time being it is still possible to use the old GS based version of the tool, but it is deprecated. The wxWidgets based version is started by default. A new tutorial has been added to the documentation. It is based on Jayson Vantuyl's article http://souja.net/2009/04/making-sense-of-erlangs-event-tracer.htm l. The functions et:trace_me/4 and et:trace_me/5 has been introduced in order to replace the deprecated functions et:report_event/4 and et:report_event/5. Hopefully the new names makes it a little more obvious what the intended usage of the functions are. A print function has been added to the GUI, in order to enable printing of sequence charts. More functionality for hiding unwanted events has been added to the GUI. The max_events, hide_unknown and display_mode configuration parameters to et_viewer is not used any more. Now the event cache in the Viewer only contains those events that actually are displayed in the GUI.
Diffstat (limited to 'lib/et/examples/et_display_demo.erl')
-rw-r--r--lib/et/examples/et_display_demo.erl32
1 files changed, 32 insertions, 0 deletions
diff --git a/lib/et/examples/et_display_demo.erl b/lib/et/examples/et_display_demo.erl
new file mode 100644
index 0000000000..ebcbc2e816
--- /dev/null
+++ b/lib/et/examples/et_display_demo.erl
@@ -0,0 +1,32 @@
+%%
+%% %CopyrightBegin%
+%% %CopyrightEnd%
+%%
+
+%module
+-module(et_display_demo).
+
+-export([test/0]).
+
+test() ->
+ {ok, Viewer} = et_viewer:start([{title,"Coffee Order"}, {max_actors,10}]),
+ Drink = {drink,iced_chai_latte},
+ Size = {size,grande},
+ Milk = {milk,whole},
+ Flavor = {flavor,vanilla},
+ C = et_viewer:get_collector_pid(Viewer),
+ et_collector:report_event(C,99,customer,barrista1,place_order,[Drink,Size,Milk,Flavor]),
+ et_collector:report_event(C,80,barrista1,register,enter_order,[Drink,Size,Flavor]),
+ et_collector:report_event(C,80,register,barrista1,give_total,"$5"),
+ et_collector:report_event(C,80,barrista1,barrista1,get_cup,[Drink,Size]),
+ et_collector:report_event(C,80,barrista1,barrista2,give_cup,[]),
+ et_collector:report_event(C,90,barrista1,customer,request_money,"$5"),
+ et_collector:report_event(C,90,customer,barrista1,pay_money,"$5"),
+ et_collector:report_event(C,80,barrista2,barrista2,get_chai_mix,[]),
+ et_collector:report_event(C,80,barrista2,barrista2,add_flavor,[Flavor]),
+ et_collector:report_event(C,80,barrista2,barrista2,add_milk,[Milk]),
+ et_collector:report_event(C,80,barrista2,barrista2,add_ice,[]),
+ et_collector:report_event(C,80,barrista2,barrista2,swirl,[]),
+ et_collector:report_event(C,80,barrista2,customer,give_tasty_beverage,[Drink,Size]),
+ ok.
+%module