From: danielhanrahan Date: Sun, 27 Jul 2025 20:56:52 +0000 (+0100) Subject: Reduce Prometheus scrape interval for tests X-Git-Url: https://gerrit.onap.org/r/gitweb?a=commitdiff_plain;h=8afd9694b6990b71ff0eda75b0a957e315591046;p=policy%2Fdocker.git Reduce Prometheus scrape interval for tests This speeds up each CSIT suite by around 1 minute by reducing the Prometheus scrape interval to 5 seconds, meaning SLA tests need only wait 5 seconds. Issue-ID: POLICY-5534 Change-Id: I8a6d4c50ef617ed935ceffadac99fd99276708d6 Signed-off-by: danielhanrahan --- diff --git a/compose/metrics/prometheus.yml b/compose/metrics/prometheus.yml index 94917aab..f164662f 100644 --- a/compose/metrics/prometheus.yml +++ b/compose/metrics/prometheus.yml @@ -1,6 +1,6 @@ # # ===========LICENSE_START==================================================== -# Copyright (C) 2022-2024 Nordix Foundation. +# Copyright (C) 2022-2026 OpenInfra Foundation Europe. All rights reserved. # Modifications Copyright 2025 Deutsche Telekom # ============================================================================ # Licensed under the Apache License, Version 2.0 (the "License"); @@ -19,8 +19,8 @@ # global config global: - scrape_interval: 60s - evaluation_interval: 60s + scrape_interval: 5s + evaluation_interval: 5s # Alertmanager configuration alerting: diff --git a/csit/resources/tests/apex-slas-10.robot b/csit/resources/tests/apex-slas-10.robot index 2a56a665..6803dcd2 100644 --- a/csit/resources/tests/apex-slas-10.robot +++ b/csit/resources/tests/apex-slas-10.robot @@ -64,7 +64,7 @@ ValidatePolicyExecutionAndEventRateModerateComplexity WaitForPrometheusServer [Documentation] Sleep time to wait for Prometheus server to gather all metrics - Sleep 2 minutes + Sleep 5 seconds ValidatePolicyExecutionTimes [Documentation] Validate policy execution times using prometheus metrics diff --git a/csit/resources/tests/apex-slas-3.robot b/csit/resources/tests/apex-slas-3.robot index c8fc2582..9c441e4e 100644 --- a/csit/resources/tests/apex-slas-3.robot +++ b/csit/resources/tests/apex-slas-3.robot @@ -65,7 +65,7 @@ ValidatePolicyExecutionAndEventRateModerateComplexity WaitForPrometheusServer [Documentation] Sleep time to wait for Prometheus server to gather all metrics - Sleep 2 minutes + Sleep 5 seconds ValidatePolicyExecutionTimes [Documentation] Validate policy execution times using prometheus metrics diff --git a/csit/resources/tests/apex-slas.robot b/csit/resources/tests/apex-slas.robot index e27f0da2..e5e1c054 100644 --- a/csit/resources/tests/apex-slas.robot +++ b/csit/resources/tests/apex-slas.robot @@ -59,7 +59,7 @@ ValidatePolicyExecutionAndEventRateHighComplexity WaitForPrometheusServer [Documentation] Sleep time to wait for Prometheus server to gather all metrics - Sleep 1 minute + Sleep 5 seconds ValidatePolicyExecutionTimes [Documentation] Validate policy execution times using prometheus metrics diff --git a/csit/resources/tests/api-slas.robot b/csit/resources/tests/api-slas.robot index 165f14a3..15972db3 100644 --- a/csit/resources/tests/api-slas.robot +++ b/csit/resources/tests/api-slas.robot @@ -14,7 +14,7 @@ ValidateResponseTimeForApi *** Test Cases *** WaitForPrometheusServer [Documentation] Sleep time to wait for Prometheus server to gather all metrics - Sleep 1 minute + Sleep 5 seconds ValidateResponseTimeForHealthcheck [Documentation] Validate component healthcheck response time diff --git a/csit/resources/tests/clamp-slas.robot b/csit/resources/tests/clamp-slas.robot index c54ac6cc..649da1a8 100644 --- a/csit/resources/tests/clamp-slas.robot +++ b/csit/resources/tests/clamp-slas.robot @@ -15,7 +15,7 @@ ValidateResponseTimeForClamp *** Test Cases *** WaitForPrometheusServer [Documentation] Sleep time to wait for Prometheus server to gather all metrics - Sleep 1 minute + Sleep 5 seconds ValidateResponseTimeForHealthcheck [Documentation] Validate component healthcheck response time @@ -55,4 +55,4 @@ ValidateResponseTimeDeleteInstance ValidateResponseTimeDeleteDefinition [Documentation] Validate delete AC Definition response time - ValidateResponseTimeForClamp /v2/compositions/{compositionId} DELETE \ No newline at end of file + ValidateResponseTimeForClamp /v2/compositions/{compositionId} DELETE diff --git a/csit/resources/tests/drools-applications-slas.robot b/csit/resources/tests/drools-applications-slas.robot index a153925d..453cf3df 100644 --- a/csit/resources/tests/drools-applications-slas.robot +++ b/csit/resources/tests/drools-applications-slas.robot @@ -5,7 +5,7 @@ Resource common-library.robot *** Test Cases *** WaitForPrometheusServer [Documentation] Sleep time to wait for Prometheus server to gather all metrics - Sleep 1 minute + Sleep 5 seconds ValidatePolicyExecutionTimes [Documentation] Validate policy execution times using prometheus metrics diff --git a/csit/resources/tests/opa-pdp-slas.robot b/csit/resources/tests/opa-pdp-slas.robot index da28b415..5e858a8a 100644 --- a/csit/resources/tests/opa-pdp-slas.robot +++ b/csit/resources/tests/opa-pdp-slas.robot @@ -5,7 +5,7 @@ Resource common-library.robot *** Test Cases *** WaitForPrometheusServer [Documentation] Sleep time to wait for Prometheus server to gather all metrics - Sleep 1 minute + Sleep 5 seconds ValidateOPAPolicyDecisionsTotalCounter [Documentation] Validate opa policy decision counters using prometheus metrics diff --git a/csit/resources/tests/pap-slas.robot b/csit/resources/tests/pap-slas.robot index e241ee9f..91328cfa 100644 --- a/csit/resources/tests/pap-slas.robot +++ b/csit/resources/tests/pap-slas.robot @@ -14,7 +14,7 @@ ValidateResponseTimeForPap *** Test Cases *** WaitForPrometheusServer [Documentation] Wait for Prometheus server to gather all metrics - Sleep 1 minute + Sleep 5 seconds ValidateResponseTimeForHealthcheck [Documentation] Validate component healthcheck response time diff --git a/csit/resources/tests/xacml-pdp-slas.robot b/csit/resources/tests/xacml-pdp-slas.robot index 98a44a80..ab4c8ff5 100644 --- a/csit/resources/tests/xacml-pdp-slas.robot +++ b/csit/resources/tests/xacml-pdp-slas.robot @@ -5,7 +5,7 @@ Resource common-library.robot *** Test Cases *** WaitForPrometheusServer [Documentation] Sleep time to wait for Prometheus server to gather all metrics - Sleep 1 minute + Sleep 5 seconds ValidatePolicyDecisionsTotalCounter [Documentation] Validate policy decision counters using prometheus metrics