diff options
author | ToineSiebelink <toine.siebelink@est.tech> | 2024-11-05 12:04:03 +0000 |
---|---|---|
committer | ToineSiebelink <toine.siebelink@est.tech> | 2024-11-18 09:27:07 +0000 |
commit | a0d4bc39ec35534688047772797f42a38780bc29 (patch) | |
tree | 886a639b46efdb3f4b7c8a21412770f8a664e124 /cps-ri | |
parent | 37962e3faca4f2306546c4f70d480b0c323d2c68 (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 'cps-ri')
-rwxr-xr-x | cps-ri/src/main/java/org/onap/cps/ri/CpsModulePersistenceServiceImpl.java | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/cps-ri/src/main/java/org/onap/cps/ri/CpsModulePersistenceServiceImpl.java b/cps-ri/src/main/java/org/onap/cps/ri/CpsModulePersistenceServiceImpl.java index 6f491ba3b7..3368aee148 100755 --- a/cps-ri/src/main/java/org/onap/cps/ri/CpsModulePersistenceServiceImpl.java +++ b/cps-ri/src/main/java/org/onap/cps/ri/CpsModulePersistenceServiceImpl.java @@ -27,6 +27,7 @@ import static com.google.common.base.Preconditions.checkNotNull; import com.google.common.base.MoreObjects; import com.google.common.collect.ImmutableSet; +import io.micrometer.core.annotation.Timed; import jakarta.transaction.Transactional; import java.io.ByteArrayInputStream; import java.io.IOException; @@ -186,6 +187,8 @@ public class CpsModulePersistenceServiceImpl implements CpsModulePersistenceServ // can occur in case of specific concurrent requests. @Retryable(retryFor = DuplicatedYangResourceException.class, maxAttempts = 5, backoff = @Backoff(random = true, delay = 200, maxDelay = 2000, multiplier = 2)) + @Timed(value = "cps.module.persistence.schemaset.store", + description = "Time taken to store a schemaset (list of module references") public void storeSchemaSetFromModules(final String dataspaceName, final String schemaSetName, final Map<String, String> newModuleNameToContentMap, final Collection<ModuleReference> allModuleReferences) { |