Search in sources :

Example 1 with IOITMetrics

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

the class TextIOIT method collectAndPublishMetrics.

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

Example 2 with IOITMetrics

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

the class XmlIOIT method collectAndPublishResults.

private void collectAndPublishResults(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, XMLIOIT_NAMESPACE, uuid, timestamp);
    metrics.publishToInflux(settings);
}
Also used : SimpleFunction(org.apache.beam.sdk.transforms.SimpleFunction) Function(java.util.function.Function) IOITMetrics(org.apache.beam.sdk.testutils.metrics.IOITMetrics)

Example 3 with IOITMetrics

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

the class HadoopFormatIOIT method collectAndPublishMetrics.

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

Example 4 with IOITMetrics

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

the class MongoDBIOIT method collectAndPublishMetrics.

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

Example 5 with IOITMetrics

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

the class BigQueryIOPushDownIT method collectAndPublishMetrics.

private void collectAndPublishMetrics(PipelineResult readResult, String postfix) {
    String uuid = UUID.randomUUID().toString();
    String timestamp = Timestamp.now().toString();
    Set<Function<MetricsReader, NamedTestResult>> readSuppliers = getReadSuppliers(uuid, timestamp);
    IOITMetrics readMetrics = new IOITMetrics(readSuppliers, readResult, NAMESPACE, uuid, timestamp);
    readMetrics.publishToInflux(settings.copyWithMeasurement(settings.measurement + postfix));
}
Also used : 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