Module dipstick::core
[−]
[src]
Dipstick metrics core types and traits.
This is mostly centered around the backend.
Application-facing types are in the app
module.
Structs
Chain |
A pair of functions composing a twin "chain of command". This is the building block for the metrics backend. |
TimeHandle |
A handle to the start time of a counter. Wrapped so it may be changed safely later. |
Enums
Kind |
Used to differentiate between metric kinds in the backend. |
ScopeCmd |
An method dispatching command enum to manipulate metric scopes.
Replaces a potential |
Constants
FULL_SAMPLING_RATE |
Do not sample, use all data. |
Type Definitions
ControlScopeFn |
Returns a callback function to send commands to the metric scope. Writes can be performed by passing Some((&Metric, Value)) Flushes can be performed by passing None Used to write values to the scope or flush the scope buffer (if applicable). Simple applications may use only one scope. Complex applications may define a new scope fo each operation or request. Scopes can be moved acrossed threads (Send) but are not required to be thread-safe (Sync). Some implementations may be 'Sync', otherwise queue()ing or threadlocal() can be used. |
DefineMetricFn |
Dynamic metric definition function.
Metrics can be defined from any thread, concurrently (Fn is Sync).
The resulting metrics themselves can be also be safely shared across threads ( |
OpenScopeFn |
A function trait that opens a new metric capture scope. |
Rate |
Base type for sampling rate. - 1.0 records everything - 0.5 records one of two values - 0.0 records nothing The actual distribution (random, fixed-cycled, etc) depends on selected sampling method. |
Value |
Base type for recorded metric values. |