CDPotion.Domain.Performance (cdpotion v0.1.4)

Summary

Types

Run-time execution metric.

Functions

Disable collecting and reporting metrics.

Enable collecting and reporting metrics.

Retrieve current values of run-time metrics.

Sets time domain to use for collecting and reporting duration metrics. Note that this must be called before enabling metrics collection. Calling this method while metrics collection is enabled returns an error.

Types

@type metric() :: %{name: String.t(), value: number()}

Run-time execution metric.

Functions

@spec disable() :: {String.t(), map()}

Disable collecting and reporting metrics.

Link to this function

enable(time_domain \\ nil)

@spec enable(String.t()) :: {String.t(), map()}

Enable collecting and reporting metrics.

Parameters:

  • (Optional) time_domain: Time domain to use for collecting and reporting duration metrics.
@spec get_metrics() :: {String.t(), map()}

Retrieve current values of run-time metrics.

Link to this function

set_time_domain(time_domain)

@spec set_time_domain(String.t()) :: {String.t(), map()}

Sets time domain to use for collecting and reporting duration metrics. Note that this must be called before enabling metrics collection. Calling this method while metrics collection is enabled returns an error.

Parameters:

  • (Required) time_domain: Time domain