Module xprof_gui_rest

HTTP server independent part of the REST API implementation.

Description

HTTP server independent part of the REST API implementation

Autocomplete

/api/funs

Returns:

Get expansion suggestions for the given possibly incomplete query. Used for autocomplete suggestions on the GUI. "commonPrefix" can be used to append to the query if no suggestion is selected. "prefix" can be appended to the query if the given suggestion is selected.

/api/get_callees

Params: Returns:

Get list of functions (MFAs) that are called by the specified function (MFA) based on static analysis (ie. not based on runtime information).

Monitoring functions

/api/mon_start

Params: Returns:

Start monitoring based on the specified query string.

/api/mon_stop

Params: Returns:

Stop monitoring the specified function (MFA).

/api/mon_get_all

Returns:

Return list of monitored functions. (The values of "mod", "fun" and "arity" can be used as params to calls to eg "/api/mon_stop" while "queryvalue" can be used to display the original query string).

/api/data

Params: Returns:

Return metrics gathered for the given function since the given timestamp. Each item contains a timestamp and the corresponding histogram metrics values.

Global trace status

/api/trace_set

Params: Returns:

Turn on or pause tracing of all processes.

/api/trace_status

Returns:

Return current tracing state. (The initialized status is basically the same as paused, additionally meaning that no tracing was started yet since xprof was started)

Long call capturing

/api/capture

Params: Returns:

Start capturing arguments and return values of function calls that lasted longer than the specified time threshold in ms. Stop after limit number of captured calls.

/api/capture_stop

Params: Returns:

Stop capturing long calls of the given function (MFA).

/api/capture_data

Params: Returns:

Return captured arguments and return values.

The Offset argument is the item index last seen by the caller, only items newer than that will be returned. An offset of 0 will return all data.

The returned HasMore indicates whether capturing is still ongoing or it has been stopped either manually or by reaching the limit.

Syntax mode

/api/mode

Returns: Get syntax mode, if not set explicitely in the backend, it will be autodetected.

Function Index

handle_req/2

Function Details

handle_req/2

handle_req(Path :: binary(), Params :: [{binary(), binary()}]) ->
              StatusCode | {StatusCode, Body}


Generated by EDoc