Search in sources :

Example 6 with IOITMetrics

use of org.apache.beam.sdk.testutils.metrics.IOITMetrics in project beam by apache.

the class JdbcIOIT method gatherAndPublishMetrics.

private void gatherAndPublishMetrics(PipelineResult writeResult, PipelineResult readResult) {
    String uuid = UUID.randomUUID().toString();
    String timestamp = Timestamp.now().toString();
    Set<Function<MetricsReader, NamedTestResult>> metricSuppliers = getWriteMetricSuppliers(uuid, timestamp);
    IOITMetrics writeMetrics = new IOITMetrics(metricSuppliers, writeResult, NAMESPACE, uuid, timestamp);
    writeMetrics.publishToInflux(settings);
    IOITMetrics readMetrics = new IOITMetrics(getReadMetricSuppliers(uuid, timestamp), readResult, NAMESPACE, uuid, timestamp);
    readMetrics.publishToInflux(settings);
}
Also used : Function(java.util.function.Function) IOITMetrics(org.apache.beam.sdk.testutils.metrics.IOITMetrics)

Example 7 with IOITMetrics

use of org.apache.beam.sdk.testutils.metrics.IOITMetrics in project beam by apache.

the class AvroIOIT method collectAndPublishMetrics.

private void collectAndPublishMetrics(PipelineResult result) {
    String uuid = UUID.randomUUID().toString();
    String timestamp = Timestamp.now().toString();
    Set<Function<MetricsReader, NamedTestResult>> metricSuppliers = fillMetricSuppliers(uuid, timestamp);
    final IOITMetrics metrics = new IOITMetrics(metricSuppliers, result, AVRO_NAMESPACE, uuid, timestamp);
    metrics.publishToInflux(settings);
}
Also used : Function(java.util.function.Function) IOITMetrics(org.apache.beam.sdk.testutils.metrics.IOITMetrics)

Example 8 with IOITMetrics

use of org.apache.beam.sdk.testutils.metrics.IOITMetrics in project beam by apache.

the class ParquetIOIT method collectAndPublishMetrics.

private void collectAndPublishMetrics(PipelineResult result) {
    String uuid = UUID.randomUUID().toString();
    String timestamp = Timestamp.now().toString();
    Set<Function<MetricsReader, NamedTestResult>> metricSuppliers = fillMetricSuppliers(uuid, timestamp);
    final IOITMetrics metrics = new IOITMetrics(metricSuppliers, result, PARQUET_NAMESPACE, uuid, timestamp);
    metrics.publishToInflux(settings);
}
Also used : SerializableFunction(org.apache.beam.sdk.transforms.SerializableFunction) Function(java.util.function.Function) IOITMetrics(org.apache.beam.sdk.testutils.metrics.IOITMetrics)

Aggregations

Function (java.util.function.Function)8 IOITMetrics (org.apache.beam.sdk.testutils.metrics.IOITMetrics)8 SimpleFunction (org.apache.beam.sdk.transforms.SimpleFunction)2 Timestamp (com.google.cloud.Timestamp)1 SerializableFunction (org.apache.beam.sdk.transforms.SerializableFunction)1