apache_beam.testing.load_tests.dataflow_cost_benchmark module

class apache_beam.testing.load_tests.dataflow_cost_benchmark.DataflowCostBenchmark(metrics_namespace: str | None = None, is_streaming: bool = False, gpu: Accelerator | None = None)[source]

Bases: LoadTest

Base class for Dataflow performance tests which export metrics to external databases: BigQuery or/and InfluxDB. Calculates the expected cost for running the job on Dataflow in region us-central1.

Refer to LoadTestOptions for more information on the required pipeline options.

If using InfluxDB with Basic HTTP authentication enabled, provide the following environment options: INFLUXDB_USER and INFLUXDB_USER_PASSWORD.

If the hardware configuration for the job includes use of a GPU, please specify the version in use with the Accelerator enumeration. This is used to calculate the cost of the job later, as different accelerators have different billing rates per hour of use.

run()[source]