aboutsummaryrefslogtreecommitdiffstats
path: root/integration-test/src/test/java
diff options
context:
space:
mode:
authorToineSiebelink <toine.siebelink@est.tech>2024-11-05 12:04:03 +0000
committerToineSiebelink <toine.siebelink@est.tech>2024-11-18 09:27:07 +0000
commita0d4bc39ec35534688047772797f42a38780bc29 (patch)
tree886a639b46efdb3f4b7c8a21412770f8a664e124 /integration-test/src/test/java
parent37962e3faca4f2306546c4f70d480b0c323d2c68 (diff)
Test to highlight ModuleSetTag Inefficiencies
- Add (micrometer) instrumentation to expose inefficiencies - Add test config for micrometer - Add setup methods in base to create many cm handles - Set module sync parallelism to 2 for testing - Add clean up methods for hazelcast related tests - added test to show inefficiencies - POC 1 use hazelcast set to prevent multiple threads working on same ModuleSetTag - POC 2 'cache' module set tags per thread to prevent DB looks ups - Main inefficiency left: create schemaset for EACH cm Handled even if same tag. No easy PoC... Change-Id: Idf46b44c475a24727dd7084bb613459f4c29be55 Signed-off-by: ToineSiebelink <toine.siebelink@est.tech>
Diffstat (limited to 'integration-test/src/test/java')
-rw-r--r--integration-test/src/test/java/org/onap/cps/integration/MicroMeterTestConfig.java41
1 files changed, 41 insertions, 0 deletions
diff --git a/integration-test/src/test/java/org/onap/cps/integration/MicroMeterTestConfig.java b/integration-test/src/test/java/org/onap/cps/integration/MicroMeterTestConfig.java
new file mode 100644
index 0000000000..3b26f42c8a
--- /dev/null
+++ b/integration-test/src/test/java/org/onap/cps/integration/MicroMeterTestConfig.java
@@ -0,0 +1,41 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2024 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the 'License');
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an 'AS IS' BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.cps.integration;
+
+import io.micrometer.core.aop.TimedAspect;
+import io.micrometer.core.instrument.MeterRegistry;
+import io.micrometer.core.instrument.simple.SimpleMeterRegistry;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+
+@Configuration
+public class MicroMeterTestConfig {
+ @Bean
+ public MeterRegistry meterRegistry() {
+ return new SimpleMeterRegistry(); // Use a simple in-memory registry for testing
+ }
+
+ @Bean
+ public TimedAspect timedAspect(final MeterRegistry meterRegistry) {
+ return new TimedAspect(meterRegistry);
+ }
+}
+