public interface MetricsAssertHelper
Modifier and Type | Method and Description |
---|---|
void |
assertCounter(String name,
long expected,
BaseSource source)
Assert that a counter exists and that it's value is equal to the expected value.
|
void |
assertCounterGt(String name,
long expected,
BaseSource source)
Assert that a counter exists and that it's value is greater than the given value.
|
void |
assertCounterLt(String name,
long expected,
BaseSource source)
Assert that a counter exists and that it's value is less than the given value.
|
void |
assertGauge(String name,
double expected,
BaseSource source)
Assert that a gauge exists and that it's value is equal to the expected value.
|
void |
assertGauge(String name,
long expected,
BaseSource source)
Assert that a gauge exists and that it's value is equal to the expected value.
|
void |
assertGaugeGt(String name,
double expected,
BaseSource source)
Assert that a gauge exists and it's value is greater than a given value
|
void |
assertGaugeGt(String name,
long expected,
BaseSource source)
Assert that a gauge exists and it's value is greater than a given value
|
void |
assertGaugeLt(String name,
double expected,
BaseSource source)
Assert that a gauge exists and it's value is less than a given value
|
void |
assertGaugeLt(String name,
long expected,
BaseSource source)
Assert that a gauge exists and it's value is less than a given value
|
void |
assertTag(String name,
String expected,
BaseSource source)
Assert that a tag exists and has a given value.
|
long |
getCounter(String name,
BaseSource source)
Get the value of a counter.
|
double |
getGaugeDouble(String name,
BaseSource source)
Get the value of a gauge as a double.
|
long |
getGaugeLong(String name,
BaseSource source)
Get the value of a gauge as a long.
|
void |
init()
Init helper.
|
void init()
void assertTag(String name, String expected, BaseSource source)
name
- The name of the tag.expected
- The expected valuesource
- The BaseSourceBaseSource
that will provide the tags,
gauges, and counters.void assertGauge(String name, long expected, BaseSource source)
name
- The name of the gaugeexpected
- The expected value of the gauge.source
- The BaseSourceBaseSource
that will provide the tags,
gauges, and counters.void assertGaugeGt(String name, long expected, BaseSource source)
name
- The name of the gaugeexpected
- Value that the gauge is expected to be greater thansource
- The BaseSourceBaseSource
that will provide the tags,
gauges, and counters.void assertGaugeLt(String name, long expected, BaseSource source)
name
- The name of the gaugeexpected
- Value that the gauge is expected to be less thansource
- The BaseSourceBaseSource
that will provide the tags,
gauges, and counters.void assertGauge(String name, double expected, BaseSource source)
name
- The name of the gaugeexpected
- The expected value of the gauge.source
- The BaseSourceBaseSource
that will provide the tags,
gauges, and counters.void assertGaugeGt(String name, double expected, BaseSource source)
name
- The name of the gaugeexpected
- Value that the gauge is expected to be greater thansource
- The BaseSourceBaseSource
that will provide the tags,
gauges, and counters.void assertGaugeLt(String name, double expected, BaseSource source)
name
- The name of the gaugeexpected
- Value that the gauge is expected to be less thansource
- The BaseSourceBaseSource
that will provide the tags,
gauges, and counters.void assertCounter(String name, long expected, BaseSource source)
name
- The name of the counter.expected
- The expected valuesource
- The BaseSourceBaseSource
that will provide the tags,
gauges, and counters.void assertCounterGt(String name, long expected, BaseSource source)
name
- The name of the counter.expected
- The value the counter is expected to be greater than.source
- The BaseSourceBaseSource
that will provide the tags,
gauges, and counters.void assertCounterLt(String name, long expected, BaseSource source)
name
- The name of the counter.expected
- The value the counter is expected to be less than.source
- The BaseSourceBaseSource
that will provide the tags,
gauges, and counters.long getCounter(String name, BaseSource source)
name
- name of the counter.source
- The BaseSourceBaseSource
that will provide the tags,
gauges, and counters.double getGaugeDouble(String name, BaseSource source)
name
- name of the gauge.source
- The BaseSourceBaseSource
that will provide the tags,
gauges, and counters.long getGaugeLong(String name, BaseSource source)
name
- name of the gauge.source
- The BaseSourceBaseSource
that will provide the tags,
gauges, and counters.