From 2aca845e65aa045095e8f3294b8e2fd2f4f0f747 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn-Egil=20Dahlberg?= Date: Thu, 12 May 2016 20:05:58 +0200 Subject: et: Fix linting documentation xml tags --- lib/et/doc/src/et_desc.xmlsrc | 82 +++++++++++++++++++------------------------ 1 file changed, 37 insertions(+), 45 deletions(-) (limited to 'lib/et/doc/src/et_desc.xmlsrc') diff --git a/lib/et/doc/src/et_desc.xmlsrc b/lib/et/doc/src/et_desc.xmlsrc index 96a4a9df31..29e0ab1fe3 100644 --- a/lib/et/doc/src/et_desc.xmlsrc +++ b/lib/et/doc/src/et_desc.xmlsrc @@ -55,13 +55,12 @@

{ok, Viewer} = et_viewer:start([]). - {ok,<0.40.0>}]]> +Eshell V5.7.4 (abort with ^G) +1> {ok, Viewer} = et_viewer:start([]). +{ok,<0.40.0>}]]>

A Viewer gets trace Events from its Collector by polling it regularly for more Events to @@ -69,40 +68,38 @@ Collector with et_collector:report_event/6:

Collector = et_viewer:get_collector_pid(Viewer). - <0.39.0> - 3> et_collector:report_event(Collector, 60, my_shell, mnesia_tm, start_outer, - 3> "Start outer transaction"), - 3> et_collector:report_event(Collector, 40, mnesia_tm, my_shell, new_tid, - 3> "New transaction id is 4711"), - 3> et_collector:report_event(Collector, 20, my_shell, mnesia_locker, try_write_lock, - 3> "Acquire write lock for {my_tab, key}"), - 3> et_collector:report_event(Collector, 10, mnesia_locker, my_shell, granted, - 3> "You got the write lock for {my_tab, key}"), - 3> et_collector:report_event(Collector, 60, my_shell, do_commit, - 3> "Perform transaction commit"), - 3> et_collector:report_event(Collector, 40, my_shell, mnesia_locker, release_tid, - 3> "Release all locks for transaction 4711"), - 3> et_collector:report_event(Collector, 60, my_shell, mnesia_tm, delete_transaction, - 3> "End of outer transaction"), - 3> et_collector:report_event(Collector, 20, my_shell, end_outer, - 3> "Transaction returned {atomic, ok}"). - {ok,{table_handle,<0.39.0>,16402,trace_ts, - #Fun}}]]> +2> Collector = et_viewer:get_collector_pid(Viewer). +<0.39.0> +3> et_collector:report_event(Collector, 60, my_shell, mnesia_tm, start_outer, +3> "Start outer transaction"), +3> et_collector:report_event(Collector, 40, mnesia_tm, my_shell, new_tid, +3> "New transaction id is 4711"), +3> et_collector:report_event(Collector, 20, my_shell, mnesia_locker, try_write_lock, +3> "Acquire write lock for {my_tab, key}"), +3> et_collector:report_event(Collector, 10, mnesia_locker, my_shell, granted, +3> "You got the write lock for {my_tab, key}"), +3> et_collector:report_event(Collector, 60, my_shell, do_commit, +3> "Perform transaction commit"), +3> et_collector:report_event(Collector, 40, my_shell, mnesia_locker, release_tid, +3> "Release all locks for transaction 4711"), +3> et_collector:report_event(Collector, 60, my_shell, mnesia_tm, delete_transaction, +3> "End of outer transaction"), +3> et_collector:report_event(Collector, 20, my_shell, end_outer, +3> "Transaction returned {atomic, ok}"). +{ok,{table_handle,<0.39.0>,16402,trace_ts, + #Fun}}]]>

This actually is a simulation of the process Events caused by a Mnesia transaction that writes a record in a local table:

mnesia:write({my_tab, key, val}) end).]]> +mnesia:transaction(fun() -> mnesia:write({my_tab, key, val}) end).]]>

At this stage when we have a couple of Events, it is time to show how it looks like in the graphical interface of et_viewer:

-

- A simulated Mnesia transaction which writes one record @@ -144,11 +141,11 @@

false | true | {true, NewEvent} +filter(TraceData) -> false | true | {true, NewEvent} - TraceData = Event | erlang_trace_data() - Event = #event{} - NewEvent = #event{}]]> +TraceData = Event | erlang_trace_data() +Event = #event{} +NewEvent = #event{}]]>

The interface of the filter function is the same as the the filter functions for the good old lists:filtermap/2. If the filter @@ -204,10 +201,10 @@

Fun = fun(E) -> et_demo:mgr_actors(E) end. - #Fun - 5> et_collector:dict_insert(Collector, {filter, mgr_actors}, Fun). - ok]]> +4> Fun = fun(E) -> et_demo:mgr_actors(E) end. +#Fun +5> et_collector:dict_insert(Collector, {filter, mgr_actors}, Fun). +ok]]>

you will see that the Filter menu in all viewers have got a new entry called mgr_actors. Select it, and a new @@ -228,21 +225,16 @@ Contents Viewer window to pop up, showing the Event in the mgr_actors view:

-

- - The trace Event in the mgr_actors view + The trace Event in the mgr_actors view

Select the all entry in the Filters menu and a new Contents Viewer window will pop up showing the same trace Event in the collectors view:

-

- - The same trace Event in the collectors - view + The same trace Event in the collectors view @@ -311,7 +303,7 @@ et_collector or et_viewer in order to activate the global tracing. There is no restriction on how many concurrent (anonymous) collectors you can have, but you can only have one - global Collector as its name is registered in + global Collector as its name is registered in global.

In order to further simplify the tracing, you can make use of -- cgit v1.2.3