From 72fd298a43bb52874ea6c7289016a416b3b35a2e Mon Sep 17 00:00:00 2001 From: bvn13 Date: Tue, 16 Aug 2022 14:30:19 +0300 Subject: [PATCH] small performance improvement --- README.md | 2 +- logger-testing/pom.xml | 4 +- logger/pom.xml | 143 +++++++++++++++++- .../normalized/NormalizedFeignLogger.java | 9 +- pom.xml | 143 +----------------- 5 files changed, 151 insertions(+), 150 deletions(-) diff --git a/README.md b/README.md index aa766b0..2857249 100644 --- a/README.md +++ b/README.md @@ -108,7 +108,7 @@ for Maven me.bvn13.openfeign.logger feign-normalized-logger - 0.1.4 + 0.2.1 ``` diff --git a/logger-testing/pom.xml b/logger-testing/pom.xml index 552a38b..b5b9e03 100644 --- a/logger-testing/pom.xml +++ b/logger-testing/pom.xml @@ -5,7 +5,7 @@ me.bvn13.openfeign.logger feign-normalized-logger - 0.1.5-SNAPSHOT + 0.2.1-SNAPSHOT 4.0.0 @@ -22,7 +22,7 @@ me.bvn13.openfeign.logger feign-normalized-logger - 0.1.4 + 0.2.1-SNAPSHOT test diff --git a/logger/pom.xml b/logger/pom.xml index 8f40c97..d705ad0 100644 --- a/logger/pom.xml +++ b/logger/pom.xml @@ -5,7 +5,7 @@ me.bvn13.openfeign.logger feign-normalized-logger - 0.1.5-SNAPSHOT + 0.2.1-SNAPSHOT 4.0.0 @@ -32,4 +32,145 @@ + + + internal.repo + Temporary Staging Repository + file://${project.build.directory}/mvn-repo + + + + + feign-normalized-logger + + + + + maven-source-plugin + + + attach-sources + + jar-no-fork + + + + + + maven-surefire-plugin + ${maven-surefire-plugin.version} + + + com.amashchenko.maven.plugin + gitflow-maven-plugin + ${gitflow-maven-plugin.version} + + false + + develop + + true + 2 + + + + + + + + + release + + + + org.apache.maven.plugins + maven-source-plugin + + + attach-sources + verify + + jar-no-fork + + + + + + org.apache.maven.plugins + maven-javadoc-plugin + + + attach-javadocs + + jar + + + + + + org.apache.maven.plugins + maven-deploy-plugin + ${maven-deploy-plugin.version} + + true + + + + org.sonatype.plugins + nexus-staging-maven-plugin + ${nexus-staging-maven-plugin.version} + true + + + default-deploy + deploy + + deploy + + + + + ossrh + ${nexus.url} + true + + + + org.apache.maven.plugins + maven-gpg-plugin + ${maven-gpg-plugin.version} + + + sign-artifacts + verify + + sign + + + + + + + + + + ossrh + ${nexus.url}/content/repositories/snapshots + + + ossrh + ${nexus.url}/service/local/staging/deploy/maven2/ + + + + + + jcenter + JCenter + https://jcenter.bintray.com/ + + + + + \ No newline at end of file diff --git a/logger/src/main/java/me/bvn13/openfeign/logger/normalized/NormalizedFeignLogger.java b/logger/src/main/java/me/bvn13/openfeign/logger/normalized/NormalizedFeignLogger.java index 255f3ac..ea32315 100644 --- a/logger/src/main/java/me/bvn13/openfeign/logger/normalized/NormalizedFeignLogger.java +++ b/logger/src/main/java/me/bvn13/openfeign/logger/normalized/NormalizedFeignLogger.java @@ -6,6 +6,7 @@ import org.slf4j.LoggerFactory; import java.util.Collection; import java.util.Collections; +import java.util.HashMap; import java.util.Iterator; import java.util.LinkedList; import java.util.List; @@ -69,16 +70,16 @@ public class NormalizedFeignLogger extends feign.Logger { private void init() { if (isResponse.get() == null) { - isResponse.set(new ConcurrentHashMap<>()); + isResponse.set(new HashMap<>()); } if (methodName.get() == null) { - methodName.set(new ConcurrentHashMap<>()); + methodName.set(new HashMap<>()); } if (logsRequest.get() == null) { - logsRequest.set(new ConcurrentHashMap<>()); + logsRequest.set(new HashMap<>()); } if (logsResponse.get() == null) { - logsResponse.set(new ConcurrentHashMap<>()); + logsResponse.set(new HashMap<>()); } } diff --git a/pom.xml b/pom.xml index 24fa613..dad775b 100644 --- a/pom.xml +++ b/pom.xml @@ -7,7 +7,7 @@ me.bvn13.openfeign.logger feign-normalized-logger - 0.1.5-SNAPSHOT + 0.2.1-SNAPSHOT logger @@ -55,51 +55,6 @@ 4.5.13 - - - internal.repo - Temporary Staging Repository - file://${project.build.directory}/mvn-repo - - - - - feign-normalized-logger - - - - - maven-source-plugin - - - attach-sources - - jar-no-fork - - - - - - maven-surefire-plugin - ${maven-surefire-plugin.version} - - - com.amashchenko.maven.plugin - gitflow-maven-plugin - ${gitflow-maven-plugin.version} - - false - - develop - - true - 2 - - - - - - bvn13 @@ -118,100 +73,4 @@ https://github.com/bvn13/OpenFeign-NormalizedLogger.git - - - release - - - - org.apache.maven.plugins - maven-source-plugin - - - attach-sources - verify - - jar-no-fork - - - - - - org.apache.maven.plugins - maven-javadoc-plugin - - - attach-javadocs - - jar - - - - - - org.apache.maven.plugins - maven-deploy-plugin - ${maven-deploy-plugin.version} - - true - - - - org.sonatype.plugins - nexus-staging-maven-plugin - ${nexus-staging-maven-plugin.version} - true - - - default-deploy - deploy - - deploy - - - - - ossrh - ${nexus.url} - true - - - - org.apache.maven.plugins - maven-gpg-plugin - ${maven-gpg-plugin.version} - - - sign-artifacts - verify - - sign - - - - - - - - - - ossrh - ${nexus.url}/content/repositories/snapshots - - - ossrh - ${nexus.url}/service/local/staging/deploy/maven2/ - - - - - - jcenter - JCenter - https://jcenter.bintray.com/ - - - - - \ No newline at end of file