submit/2 | Submit a code to be metered. |
submit(Nsp, Fun) -> any()
Submit a code to be metered.
This function will execute function Fun
while
measuring execution time and save that time into
a specified namespace Nsp
within Folsom Metrics
toolset.
Nsp
may look like:
egtm.operation.get
, .set
, .order
, ...egtm.cluster.operation.get
, .set
, .order
, ...At the moment, we measure only execution time (histogram) and number of executions (counter).
To simplify calling egtm_metrics:submit()
, there is
also ?metrics ()
macro available.
?metrics ("myapp.call.myfun", fun () -> myfun (1, 2, 3) end).
Generated by EDoc, Aug 19 2012, 02:27:27.