View Source et_viewer (et v1.7.1)

Displays a sequence chart for trace events (messages/actions)

Summary

Functions

file(FileName) -> {ok, ViewerPid} | {error, Reason}

get_collector_pid(ViewerPid) -> CollectorPid

start() -> ok

start(Options) -> ok

start_link(Options) -> {ok, ViewerPid} | {error, Reason}

stop(ViewerPid) -> ok

Types

Link to this type

actors()

View Source (not exported)
-type actors() :: [term()].
Link to this type

first_key()

View Source (not exported)
-type first_key() :: term().
Link to this type

option()

View Source (not exported)
-type option() ::
    {title, string()} |
    {detail_level, 0..100} |
    {is_suspended, boolean()} |
    {scale, integer()} |
    {width, integer()} |
    {height, integer()} |
    {collector_pid, pid() | undefined} |
    {active_filter, atom()} |
    {max_events, integer() | undefined} |
    {max_actors, integer() | undefined} |
    {actors, actors()} |
    {first_event, first_key()} |
    {hide_unknown, boolean()} |
    {hide_actions, boolean()} |
    {display_mode, all | {search_actors, forward | reverse, first_key(), actors()}}.

Functions

-spec file(FileName :: file:filename()) -> {ok, pid()} | {error, term()}.

file(FileName) -> {ok, ViewerPid} | {error, Reason}

Start a new event viewer and a corresponding collector and load them with trace events from a trace file.

Link to this function

get_collector_pid(ViewerPid)

View Source
-spec get_collector_pid(ViewerPid :: pid()) -> pid().

get_collector_pid(ViewerPid) -> CollectorPid

Returns the identifier of the collector process.

-spec start() -> {ok, pid()} | {error, term()}.

start() -> ok

Simplified start of a sequence chart viewer with global tracing activated.

Convenient to be used from the command line (erl -s et_viewer).

-spec start(GUIorOptions) -> {ok, Viewer :: pid()} | {error, term()}
         when
             GUIorOptions :: wx | default | Options, Options :: [option() | et_collector:option()].

start(Options) -> ok

Start of a sequence chart viewer without linking to the parent process.

Link to this function

start_link(GUIorOptions)

View Source
-spec start_link(GUIorOptions) -> {ok, Viewer :: pid()} | {error, term()}
              when
                  GUIorOptions :: wx | default | Options,
                  Options :: [option() | et_collector:option()].

start_link(Options) -> {ok, ViewerPid} | {error, Reason}

Start a sequence chart viewer for trace events (messages/actions)

A filter_fun() takes an event record as sole argument and returns false | true | {true, NewEvent}.

If the collector_pid is undefined a new et_collector will be started with the following parameter settings: parent_pid, event_order, trace_global, trace_pattern, trace_port, trace_max_queue, trace_client, dict_insert and dict_delete. The new et_viewer will register itself as an et_collector subscriber.

Default values:

  • parent_pid - self().
  • title - "et_viewer".
  • detail_level - max.
  • is_suspended - false.
  • scale - 2.
  • width - 800.
  • height - 600.
  • collector_pid - undefined.
  • event_order - trace_ts.
  • active_filter - collector.
  • max_actors - 5.
  • actors - ["UNKNOWN"].
  • first_event - first.
  • hide_unknown - false.
  • hide_actions - false.
  • display_mode - all.
-spec stop(ViewerPid :: pid()) -> ok.

stop(ViewerPid) -> ok

Stops a viewer process.