-
Notifications
You must be signed in to change notification settings - Fork 15
/
eflambe_output_formatter.erl
35 lines (31 loc) · 1.56 KB
/
eflambe_output_formatter.erl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
%%%-------------------------------------------------------------------
%%% @doc
%%% Output formatter behaviour. This behavior is used so we can swap in a stub
%%% for testing the tracer.
%%% @end
%%%-------------------------------------------------------------------
-module(eflambe_output_formatter).
%%--------------------------------------------------------------------
%% This callback exists to inform the tracer of the file extension that should
%% be used for the output filename it will generate.
%%
%%--------------------------------------------------------------------
-callback extension() -> {ok, binary()}.
%%--------------------------------------------------------------------
%% This callback exists so the implementation can initialize its own internal
%% state.
%%
%%--------------------------------------------------------------------
-callback init(Options :: eflambe:options()) -> {ok, State :: any()}.
%%--------------------------------------------------------------------
%% This callback exists so the implementation module can process each individual
%% trace event.
%%
%%--------------------------------------------------------------------
-callback handle_trace_event(TraceEvent :: any(), State :: any()) -> {ok, UpdatedState :: any()}.
%%--------------------------------------------------------------------
%% This callback exists so the implementation module can finalize processing of
%% the trace data.
%%
%%--------------------------------------------------------------------
-callback finalize(Type :: return | file, State :: any()) -> {ok, Results :: any()}.