From f6fc12756847290c793215175a58f871cfb7c3fc Mon Sep 17 00:00:00 2001 From: HadhemiDD Date: Tue, 17 Dec 2024 16:55:11 +0100 Subject: [PATCH] commit --- duckdb/metadata.csv | 1 + duckdb/tests/common.py | 1 - duckdb/tests/test_unit.py | 10 +++++++++- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/duckdb/metadata.csv b/duckdb/metadata.csv index 9f2961b82b14f..96801ec7e5112 100644 --- a/duckdb/metadata.csv +++ b/duckdb/metadata.csv @@ -1,2 +1,3 @@ metric_name,metric_type,interval,unit_name,per_unit_name,description,orientation,integration,short_name,curated_metric,sample_tags duckdb.worker_threads,gauge,,,,The number of total threads used by the system,0,duckdb,, +duckdb.wal_autocheckpoint,gauge,,,,The WAL size threshold at which to automatically trigger a checkpoint,0,duckdb,, diff --git a/duckdb/tests/common.py b/duckdb/tests/common.py index 3416ff99fee2b..17a82e4cf5212 100644 --- a/duckdb/tests/common.py +++ b/duckdb/tests/common.py @@ -15,5 +15,4 @@ METRICS_MAP = [ 'duckdb.worker_threads', 'duckdb.wal_autocheckpoint', - 'duckdb.wal_autocheckpoin', ] diff --git a/duckdb/tests/test_unit.py b/duckdb/tests/test_unit.py index beba81d6035c6..b2388ed05c4aa 100644 --- a/duckdb/tests/test_unit.py +++ b/duckdb/tests/test_unit.py @@ -21,7 +21,15 @@ def test_check(dd_run_check, aggregator, instance): aggregator.assert_service_check('duckdb.can_connect', DuckdbCheck.OK) for metric in common.METRICS_MAP: aggregator.assert_metric(metric) - # aggregator.assert_metrics_using_metadata(get_metadata_metrics()) + aggregator.assert_metrics_using_metadata(get_metadata_metrics()) + +def test_version(dd_run_check, aggregator, instance): + # type: (Callable[[AgentCheck, bool], None], AggregatorStub, Dict[str, Any]) -> None + instance = common.DEFAULT_INSTANCE + check = DuckdbCheck('duckdb', {}, [instance]) + dd_run_check(check) + + aggregator.assert_service_check('duckdb.can_connect', DuckdbCheck.OK) def test_database_connection(dd_run_check, aggregator, instance):