From a2c85589f70608d047f6f9d48c82271b33c499ac Mon Sep 17 00:00:00 2001 From: Igor Dianov Date: Mon, 23 Dec 2024 05:29:29 -0800 Subject: [PATCH] Revert "Add temporary logging for cache stats" This reverts commit c801bcb0198dcdb4e1db5c5d5c0d04608f1ad65d. --- .../runtime/RuntimeBundleApplication.java | 25 ------------------- .../SecurityTestConfiguration.java | 1 - 2 files changed, 26 deletions(-) diff --git a/activiti-cloud-examples/example-runtime-bundle/starter/src/main/java/org/activiti/cloud/runtime/RuntimeBundleApplication.java b/activiti-cloud-examples/example-runtime-bundle/starter/src/main/java/org/activiti/cloud/runtime/RuntimeBundleApplication.java index 75f3d11b423..33d5487eca1 100644 --- a/activiti-cloud-examples/example-runtime-bundle/starter/src/main/java/org/activiti/cloud/runtime/RuntimeBundleApplication.java +++ b/activiti-cloud-examples/example-runtime-bundle/starter/src/main/java/org/activiti/cloud/runtime/RuntimeBundleApplication.java @@ -15,40 +15,15 @@ */ package org.activiti.cloud.runtime; -import com.github.benmanes.caffeine.cache.stats.CacheStats; import org.activiti.cloud.starter.rb.configuration.ActivitiRuntimeBundle; -import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; -import org.springframework.cache.CacheManager; -import org.springframework.cache.caffeine.CaffeineCache; -import org.springframework.scheduling.annotation.EnableScheduling; -import org.springframework.scheduling.annotation.Scheduled; @SpringBootApplication @ActivitiRuntimeBundle -@EnableScheduling public class RuntimeBundleApplication { - @Autowired - private CacheManager cacheManager; - public static void main(String[] args) { SpringApplication.run(RuntimeBundleApplication.class, args); } - - @Scheduled(fixedRate = 10000) - void printCacheStats() { - cacheManager - .getCacheNames() - .forEach(name -> { - CaffeineCache cache = (CaffeineCache) cacheManager.getCache(name); - CacheStats stats = cache.getNativeCache().stats(); - - System.out.println("Cache: " + name); - System.out.println(" Recording Stats: " + cache.getNativeCache().policy().isRecordingStats()); - System.out.println(" Estimated Size: " + cache.getNativeCache().estimatedSize()); - System.out.println(" Stats: " + stats); - }); - } } diff --git a/activiti-cloud-service-common/activiti-cloud-services-common-security/src/test/java/org/activiti/cloud/security/authorization/SecurityTestConfiguration.java b/activiti-cloud-service-common/activiti-cloud-services-common-security/src/test/java/org/activiti/cloud/security/authorization/SecurityTestConfiguration.java index 7c91f4adc44..2697ad5dd97 100644 --- a/activiti-cloud-service-common/activiti-cloud-services-common-security/src/test/java/org/activiti/cloud/security/authorization/SecurityTestConfiguration.java +++ b/activiti-cloud-service-common/activiti-cloud-services-common-security/src/test/java/org/activiti/cloud/security/authorization/SecurityTestConfiguration.java @@ -54,7 +54,6 @@ @EnableConfigurationProperties(value = AuthorizationProperties.class) public class SecurityTestConfiguration { - @Bean public ClientRegistrationRepository clientRegistrationRepository() { return mock(ClientRegistrationRepository.class);