From 43ed6b71f24a06834ee9fd6f7ceb28eda2c351ba Mon Sep 17 00:00:00 2001 From: "adheli.tavares" Date: Mon, 5 Jul 2021 14:59:40 +0100 Subject: Update pdp statistics to count deploy/undeploy separately. Issue-ID: POLICY-3383 Change-Id: I41e2668bdebd732149db0ccbe160b67b9952a8d9 Signed-off-by: adheli.tavares --- .../policy/models/pdp/concepts/PdpStatistics.java | 18 ++++++++++------ .../pdp/persistence/concepts/JpaPdpStatistics.java | 24 ++++++++++++++++++++-- 2 files changed, 34 insertions(+), 8 deletions(-) (limited to 'models-pdp/src/main/java/org/onap') diff --git a/models-pdp/src/main/java/org/onap/policy/models/pdp/concepts/PdpStatistics.java b/models-pdp/src/main/java/org/onap/policy/models/pdp/concepts/PdpStatistics.java index c9c4cda0e..13b3bdc33 100644 --- a/models-pdp/src/main/java/org/onap/policy/models/pdp/concepts/PdpStatistics.java +++ b/models-pdp/src/main/java/org/onap/policy/models/pdp/concepts/PdpStatistics.java @@ -43,12 +43,15 @@ public class PdpStatistics { private Long generatedId; private String pdpGroupName; private String pdpSubGroupName; - private long policyDeployCount; - private long policyDeploySuccessCount; - private long policyDeployFailCount; private long policyExecutedCount; private long policyExecutedSuccessCount; private long policyExecutedFailCount; + private long policyDeployCount; + private long policyDeploySuccessCount; + private long policyDeployFailCount; + private long policyUndeployCount; + private long policyUndeploySuccessCount; + private long policyUndeployFailCount; private List engineStats; /** @@ -62,12 +65,15 @@ public class PdpStatistics { this.generatedId = source.generatedId; this.pdpGroupName = source.pdpGroupName; this.pdpSubGroupName = source.pdpSubGroupName; - this.policyDeployCount = source.policyDeployCount; - this.policyDeployFailCount = source.policyDeployFailCount; - this.policyDeploySuccessCount = source.policyDeploySuccessCount; this.policyExecutedCount = source.policyExecutedCount; this.policyExecutedFailCount = source.policyExecutedFailCount; this.policyExecutedSuccessCount = source.policyExecutedSuccessCount; + this.policyDeployCount = source.policyDeployCount; + this.policyDeployFailCount = source.policyDeployFailCount; + this.policyDeploySuccessCount = source.policyDeploySuccessCount; + this.policyUndeployCount = source.policyUndeployCount; + this.policyUndeployFailCount = source.policyUndeployFailCount; + this.policyUndeploySuccessCount = source.policyUndeploySuccessCount; this.engineStats = PfUtils.mapList(source.engineStats, PdpEngineWorkerStatistics::new, null); } } diff --git a/models-pdp/src/main/java/org/onap/policy/models/pdp/persistence/concepts/JpaPdpStatistics.java b/models-pdp/src/main/java/org/onap/policy/models/pdp/persistence/concepts/JpaPdpStatistics.java index a62eaa304..0ff60b90f 100644 --- a/models-pdp/src/main/java/org/onap/policy/models/pdp/persistence/concepts/JpaPdpStatistics.java +++ b/models-pdp/src/main/java/org/onap/policy/models/pdp/persistence/concepts/JpaPdpStatistics.java @@ -66,7 +66,6 @@ import org.onap.policy.models.pdp.concepts.PdpStatistics; @EqualsAndHashCode(callSuper = false) public class JpaPdpStatistics extends PfConcept implements PfAuthorative, Serializable { private static final long serialVersionUID = -7312974966820980659L; - private static final String NULL_NAME = "NULL"; @EmbeddedId @VerifyKey @@ -101,6 +100,15 @@ public class JpaPdpStatistics extends PfConcept implements PfAuthorative engineStats; @@ -117,7 +125,7 @@ public class JpaPdpStatistics extends PfConcept implements PfAuthorative