summaryrefslogtreecommitdiffstats
path: root/model/engine-model/src/test
diff options
context:
space:
mode:
authorRashmi Pujar <rashmi.pujar1@bell.ca>2022-01-26 22:39:11 -0500
committerRashmi Pujar <rashmi.pujar1@bell.ca>2022-02-09 14:26:16 -0500
commitd71f322fa9eb51967527b14c1eeeba49838464be (patch)
tree42ca8a44b0393711a395f2b3dc90f53a383a3be2 /model/engine-model/src/test
parenta84cda443bb55b74e89a61150814596d3a311dd3 (diff)
rename metrics as per global constants for prometheus
Issue-ID: POLICY-3760 Signed-off-by: Rashmi Pujar <rashmi.pujar1@bell.ca> Change-Id: I0fb59e8d9c95fd81a1754bb769705ef753b9022d
Diffstat (limited to 'model/engine-model/src/test')
-rw-r--r--model/engine-model/src/test/java/org/onap/policy/apex/model/enginemodel/concepts/EngineStatsTest.java28
1 files changed, 12 insertions, 16 deletions
diff --git a/model/engine-model/src/test/java/org/onap/policy/apex/model/enginemodel/concepts/EngineStatsTest.java b/model/engine-model/src/test/java/org/onap/policy/apex/model/enginemodel/concepts/EngineStatsTest.java
index a40e8cbbf..3eca27c08 100644
--- a/model/engine-model/src/test/java/org/onap/policy/apex/model/enginemodel/concepts/EngineStatsTest.java
+++ b/model/engine-model/src/test/java/org/onap/policy/apex/model/enginemodel/concepts/EngineStatsTest.java
@@ -224,40 +224,36 @@ public class EngineStatsTest {
}
private void checkUpTimeMetric(AxEngineStats stats) {
- Double upTimeMetric = CollectorRegistry.defaultRegistry.getSampleValue("apex_engine_uptime",
- new String[]{AxEngineStats.ENGINE_INSTANCE_ID},
- new String[]{ENGINE_KEY + ":" + ENGINE_VERSION}) * 1000d;
+ Double upTimeMetric = CollectorRegistry.defaultRegistry.getSampleValue("pdpa_engine_uptime",
+ new String[]{AxEngineStats.ENGINE_INSTANCE_ID}, new String[]{ENGINE_KEY + ":" + ENGINE_VERSION}) * 1000d;
assertEquals(upTimeMetric.longValue(), stats.getUpTime());
}
private void checkEventsCountMetric(AxEngineStats stats) {
- Double eventsCountMetric = CollectorRegistry.defaultRegistry
- .getSampleValue("apex_engine_events_executed_count",
- new String[]{AxEngineStats.ENGINE_INSTANCE_ID},
- new String[]{ENGINE_KEY + ":" + ENGINE_VERSION});
+ Double eventsCountMetric = CollectorRegistry.defaultRegistry.getSampleValue("pdpa_engine_event_executions",
+ new String[]{AxEngineStats.ENGINE_INSTANCE_ID}, new String[]{ENGINE_KEY + ":" + ENGINE_VERSION});
assertEquals(eventsCountMetric.longValue(), stats.getEventCount());
}
private void checkLastExecTimeMetric(AxEngineStats stats) {
Double lastExecTimeMetric = CollectorRegistry.defaultRegistry
- .getSampleValue("apex_engine_last_execution_time_sum", new String[]{AxEngineStats.ENGINE_INSTANCE_ID},
- new String[]{ENGINE_KEY + ":" + ENGINE_VERSION}) * 1000d;
+ .getSampleValue("pdpa_engine_last_execution_time_sum", new String[]{AxEngineStats.ENGINE_INSTANCE_ID},
+ new String[]{ENGINE_KEY + ":" + ENGINE_VERSION}) * 1000d;
assertEquals(lastExecTimeMetric.longValue(), stats.getLastExecutionTime());
}
private void checkEngineStartTimestampMetric(AxEngineStats stats) {
Double engineStartTimestampMetric = CollectorRegistry.defaultRegistry
- .getSampleValue("apex_engine_last_start_timestamp_epoch",
- new String[]{AxEngineStats.ENGINE_INSTANCE_ID},
- new String[]{ENGINE_KEY + ":" + ENGINE_VERSION});
+ .getSampleValue("pdpa_engine_last_start_timestamp_epoch",
+ new String[]{AxEngineStats.ENGINE_INSTANCE_ID}, new String[]{ENGINE_KEY + ":" + ENGINE_VERSION});
assertEquals(engineStartTimestampMetric.longValue(), stats.getLastStart());
}
private void checkAvgExecTimeMetric(AxEngineStats stats) {
Double avgExecTimeMetric = CollectorRegistry.defaultRegistry
- .getSampleValue("apex_engine_average_execution_time_seconds",
- new String[]{AxEngineStats.ENGINE_INSTANCE_ID},
- new String[]{ENGINE_KEY + ":" + ENGINE_VERSION}) * 1000d;
+ .getSampleValue("pdpa_engine_average_execution_time_seconds",
+ new String[]{AxEngineStats.ENGINE_INSTANCE_ID},
+ new String[]{ENGINE_KEY + ":" + ENGINE_VERSION}) * 1000d;
assertEquals(avgExecTimeMetric, Double.valueOf(stats.getAverageExecutionTime()));
}
@@ -268,4 +264,4 @@ public class EngineStatsTest {
checkEngineStartTimestampMetric(stats);
checkEngineStartTimestampMetric(stats);
}
-}
+} \ No newline at end of file