diff --git a/sdks/python/apache_beam/testing/analyzers/perf_analysis.py b/sdks/python/apache_beam/testing/analyzers/perf_analysis.py index 5c4eec22b5f8..c86ecb2c4e20 100644 --- a/sdks/python/apache_beam/testing/analyzers/perf_analysis.py +++ b/sdks/python/apache_beam/testing/analyzers/perf_analysis.py @@ -162,7 +162,7 @@ def run_change_point_analysis( def run( big_query_metrics_fetcher: MetricsFetcher = BigQueryMetricsFetcher(), config_file_path: Optional[str] = None, - ) -> None: +) -> None: """ run is the entry point to run change point analysis on test metric data, which is read from config file, and if there is a performance @@ -182,7 +182,6 @@ def run( tests_config: Dict[str, Dict[str, Any]] = read_test_config(config_file_path) - for test_id, params in tests_config.items(): run_change_point_analysis( params=params, diff --git a/sdks/python/apache_beam/testing/analyzers/perf_analysis_utils.py b/sdks/python/apache_beam/testing/analyzers/perf_analysis_utils.py index 3ccf2c14b554..e8db128ba9f1 100644 --- a/sdks/python/apache_beam/testing/analyzers/perf_analysis_utils.py +++ b/sdks/python/apache_beam/testing/analyzers/perf_analysis_utils.py @@ -231,7 +231,7 @@ def filter_change_points_by_median_threshold( return valid_change_points -class MetricsFetcher: +class MetricsFetcher(metaclass=abc.ABCMeta): @abc.abstractmethod def fetch_metric_data( self, @@ -244,9 +244,10 @@ def fetch_metric_data( Define SQL query and fetch the timestamp values and metric values from BigQuery tables. """ + raise NotImplementedError -class BigQueryMetricsFetcher: +class BigQueryMetricsFetcher(MetricsFetcher): def fetch_metric_data( self, *,