use of org.apache.kafka.connect.runtime.ConnectMetrics.MetricGroup in project kafka by apache.
the class WorkerSinkTaskTest method assertTaskMetricValue.
private void assertTaskMetricValue(String name, String expected) {
MetricGroup taskGroup = workerTask.taskMetricsGroup().metricGroup();
String measured = metrics.currentMetricValueAsString(taskGroup, name);
assertEquals(expected, measured);
}
use of org.apache.kafka.connect.runtime.ConnectMetrics.MetricGroup in project kafka by apache.
the class WorkerSinkTaskTest method assertSinkMetricValue.
private void assertSinkMetricValue(String name, double expected) {
MetricGroup sinkTaskGroup = workerTask.sinkTaskMetricsGroup().metricGroup();
double measured = metrics.currentMetricValueAsDouble(sinkTaskGroup, name);
assertEquals(expected, measured, 0.001d);
}
use of org.apache.kafka.connect.runtime.ConnectMetrics.MetricGroup in project kafka by apache.
the class WorkerSinkTaskTest method assertTaskMetricValue.
private void assertTaskMetricValue(String name, double expected) {
MetricGroup taskGroup = workerTask.taskMetricsGroup().metricGroup();
double measured = metrics.currentMetricValueAsDouble(taskGroup, name);
assertEquals(expected, measured, 0.001d);
}
use of org.apache.kafka.connect.runtime.ConnectMetrics.MetricGroup in project kafka by apache.
the class WorkerSinkTaskTest method sinkMetricValue.
private double sinkMetricValue(String metricName) {
MetricGroup sinkTaskGroup = workerTask.sinkTaskMetricsGroup().metricGroup();
double value = metrics.currentMetricValueAsDouble(sinkTaskGroup, metricName);
System.out.println("** " + metricName + "=" + value);
return value;
}
Aggregations