public final class FastStatsDClient extends Object implements StatsDClient
StatsDClient implementation
uses thread-local ByteBuffer for efficient message format.
For long values it has ZERO allocations.
Important note : Maximal (total) message size can only be 1048576B,| Modifier and Type | Field and Description |
|---|---|
static int |
INITIAL_BUFFER_SIZE |
static int |
MAX_BUFFER_LENGTH |
static Charset |
MESSAGE_CHARSET |
| Constructor and Description |
|---|
FastStatsDClient(Sender sender) |
FastStatsDClient(String prefix,
Sender sender) |
FastStatsDClient(String prefix,
Sender sender,
boolean exactDoubles) |
| Modifier and Type | Method and Description |
|---|---|
void |
clear() |
void |
count(byte[] aspect,
double delta,
double sampleRate,
Tag... tags)
Adjusts the specified counter by a given delta.
|
void |
count(byte[] aspect,
double delta,
Tag... tags)
Adjusts the specified counter by a given delta.
|
void |
count(byte[] aspect,
long delta,
double sampleRate,
Tag... tags)
Adjusts the specified counter by a given delta.
|
void |
count(byte[] aspect,
long delta,
Tag... tags)
Adjusts the specified counter by a given delta.
|
void |
gauge(byte[] aspect,
char deltaSign,
double value,
Tag... tags)
Records the delta value for the specified named gauge.
|
void |
gauge(byte[] aspect,
char deltaSign,
long value,
Tag... tags)
Records the delta value for the specified named gauge.
|
void |
gauge(byte[] aspect,
double value,
double sampleRate,
Tag... tags)
Records the latest fixed value for the specified named gauge.
|
void |
gauge(byte[] aspect,
double value,
Tag... tags)
Records the latest fixed value for the specified named gauge.
|
void |
gauge(byte[] aspect,
long value,
double sampleRate,
Tag... tags)
Records the latest fixed value for the specified named gauge.
|
void |
gauge(byte[] aspect,
long value,
Tag... tags)
Records the latest fixed value for the specified named gauge.
|
void |
histogram(byte[] aspect,
double value,
double sampleRate,
Tag... tags)
Records a value for the specified named histogram.
|
void |
histogram(byte[] aspect,
double value,
Tag... tags)
Records a value for the specified named histogram.
|
void |
histogram(byte[] aspect,
long value,
double sampleRate,
Tag... tags)
Records a value for the specified named histogram.
|
void |
histogram(byte[] aspect,
long value,
Tag... tags)
Records a value for the specified named histogram.
|
void |
meter(byte[] aspect,
double value,
Tag... tags)
Records a value for the specified named meter.
|
void |
meter(byte[] aspect,
long value,
Tag... tags)
Records a value for the specified named meter.
|
void |
set(byte[] aspect,
double value,
double sampleRate,
Tag... tags)
Records a value for the specified named set.
|
void |
set(byte[] aspect,
double value,
Tag... tags)
Records a value for the specified named set.
|
void |
set(byte[] aspect,
long value,
double sampleRate,
Tag... tags)
Records a value for the specified named set.
|
void |
set(byte[] aspect,
long value,
Tag... tags)
Records a value for the specified named distribution.
|
void |
time(byte[] aspect,
long timeInMs,
double sampleRate,
Tag... tags)
Records an execution time in milliseconds for the specified named operation.
|
void |
time(byte[] aspect,
long timeInMs,
Tag... tags)
Records an execution time in milliseconds for the specified named operation.
|
public static final Charset MESSAGE_CHARSET
public static final int INITIAL_BUFFER_SIZE
public static final int MAX_BUFFER_LENGTH
public FastStatsDClient(Sender sender)
public void count(byte[] aspect,
long delta,
Tag... tags)
StatsDClientcount in interface StatsDClientaspect - the name of the counter to adjustdelta - the amount to adjust the counter bytags - array of tags to be added to the datapublic void count(byte[] aspect,
long delta,
double sampleRate,
Tag... tags)
StatsDClientcount in interface StatsDClientaspect - the name of the counter to adjustdelta - the amount to adjust the counter bysampleRate - percentage of time metric to be senttags - array of tags to be added to the datapublic void count(byte[] aspect,
double delta,
Tag... tags)
StatsDClientcount in interface StatsDClientaspect - the name of the counter to adjustdelta - the amount to adjust the counter bytags - array of tags to be added to the datapublic void count(byte[] aspect,
double delta,
double sampleRate,
Tag... tags)
StatsDClientcount in interface StatsDClientaspect - the name of the counter to adjustdelta - the amount to adjust the counter bysampleRate - percentage of time metric to be senttags - array of tags to be added to the datapublic void gauge(byte[] aspect,
long value,
Tag... tags)
StatsDClientgauge in interface StatsDClientaspect - the name of the gaugevalue - the new reading of the gaugepublic void gauge(byte[] aspect,
char deltaSign,
long value,
Tag... tags)
StatsDClientgauge in interface StatsDClientaspect - the name of the gaugedeltaSign - either '+' or '-' to indicate either increase or decrease gauge valuevalue - the (positive!) change of valuepublic void gauge(byte[] aspect,
long value,
double sampleRate,
Tag... tags)
StatsDClientgauge in interface StatsDClientaspect - the name of the gaugevalue - the new reading of the gaugesampleRate - percentage of time metric to be senttags - array of tags to be added to the datapublic void gauge(byte[] aspect,
double value,
Tag... tags)
StatsDClientgauge in interface StatsDClientaspect - the name of the gaugevalue - the new reading of the gaugepublic void gauge(byte[] aspect,
char deltaSign,
double value,
Tag... tags)
StatsDClientgauge in interface StatsDClientaspect - the name of the gaugedeltaSign - either '+' or '-' to indicate either increase or decrease gauge valuevalue - the (positive!) change of valuepublic void gauge(byte[] aspect,
double value,
double sampleRate,
Tag... tags)
StatsDClientgauge in interface StatsDClientaspect - the name of the gaugevalue - the new reading of the gaugesampleRate - percentage of time metric to be senttags - array of tags to be added to the datapublic void time(byte[] aspect,
long timeInMs,
Tag... tags)
StatsDClienttime in interface StatsDClientaspect - the name of the timed operationtimeInMs - the time in millisecondstags - array of tags to be added to the datapublic void time(byte[] aspect,
long timeInMs,
double sampleRate,
Tag... tags)
StatsDClienttime in interface StatsDClientaspect - the name of the timed operationtimeInMs - the time in millisecondssampleRate - percentage of time metric to be senttags - array of tags to be added to the datapublic void histogram(byte[] aspect,
long value,
Tag... tags)
StatsDClienthistogram in interface StatsDClientaspect - the name of the histogramvalue - the value to be incorporated in the histogramtags - array of tags to be added to the datapublic void histogram(byte[] aspect,
long value,
double sampleRate,
Tag... tags)
StatsDClienthistogram in interface StatsDClientaspect - the name of the histogramvalue - the value to be incorporated in the histogramsampleRate - percentage of time metric to be senttags - array of tags to be added to the datapublic void histogram(byte[] aspect,
double value,
Tag... tags)
StatsDClienthistogram in interface StatsDClientaspect - the name of the histogramvalue - the value to be incorporated in the histogramtags - array of tags to be added to the datapublic void histogram(byte[] aspect,
double value,
double sampleRate,
Tag... tags)
StatsDClienthistogram in interface StatsDClientaspect - the name of the histogramvalue - the value to be incorporated in the histogramsampleRate - percentage of time metric to be senttags - array of tags to be added to the datapublic void set(byte[] aspect,
long value,
Tag... tags)
StatsDClientset in interface StatsDClientaspect - the name of the distributionvalue - the value to be incorporated in the distributiontags - array of tags to be added to the datapublic void set(byte[] aspect,
long value,
double sampleRate,
Tag... tags)
StatsDClientset in interface StatsDClientaspect - the name of the setvalue - the value to be incorporated in the setsampleRate - percentage of time metric to be senttags - array of tags to be added to the datapublic void set(byte[] aspect,
double value,
Tag... tags)
StatsDClientset in interface StatsDClientaspect - the name of the setvalue - the value to be incorporated in the settags - array of tags to be added to the datapublic void set(byte[] aspect,
double value,
double sampleRate,
Tag... tags)
StatsDClientset in interface StatsDClientaspect - the name of the setvalue - the value to be incorporated in the setsampleRate - percentage of time metric to be senttags - array of tags to be added to the datapublic void meter(byte[] aspect,
long value,
Tag... tags)
StatsDClientmeter in interface StatsDClientaspect - the name of the metervalue - the value to be incorporated in the metertags - array of tags to be added to the datapublic void meter(byte[] aspect,
double value,
Tag... tags)
StatsDClientmeter in interface StatsDClientaspect - the name of the metervalue - the value to be incorporated in the metertags - array of tags to be added to the datapublic void clear()
Copyright © 2021. All rights reserved.