camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject [2/2] camel git commit: CAMEL-11379: Optimise - core type converters to be invoked faster
Date Thu, 29 Jun 2017 12:21:25 GMT
CAMEL-11379: Optimise - core type converters to be invoked faster


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/e621beba
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/e621beba
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/e621beba

Branch: refs/heads/master
Commit: e621beba57516e636bd0c256bcad1a86f8555ba0
Parents: c49954b
Author: Claus Ibsen <davsclaus@apache.org>
Authored: Thu Jun 29 14:20:26 2017 +0200
Committer: Claus Ibsen <davsclaus@apache.org>
Committed: Thu Jun 29 14:20:26 2017 +0200

----------------------------------------------------------------------
 .../mbean/ManagedTypeConverterRegistryMBean.java      |  4 ++--
 .../impl/converter/BaseTypeConverterRegistry.java     | 14 +++++++-------
 .../mbean/ManagedTypeConverterRegistry.java           |  4 ++--
 .../org/apache/camel/spi/TypeConverterRegistry.java   |  2 +-
 4 files changed, 12 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/e621beba/camel-core/src/main/java/org/apache/camel/api/management/mbean/ManagedTypeConverterRegistryMBean.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/api/management/mbean/ManagedTypeConverterRegistryMBean.java
b/camel-core/src/main/java/org/apache/camel/api/management/mbean/ManagedTypeConverterRegistryMBean.java
index ef5de0c..0f82a4d 100644
--- a/camel-core/src/main/java/org/apache/camel/api/management/mbean/ManagedTypeConverterRegistryMBean.java
+++ b/camel-core/src/main/java/org/apache/camel/api/management/mbean/ManagedTypeConverterRegistryMBean.java
@@ -32,8 +32,8 @@ public interface ManagedTypeConverterRegistryMBean extends ManagedServiceMBean
{
     @ManagedAttribute(description = "Number of type conversion hits (successful conversions)")
     long getHitCounter();
 
-    @ManagedAttribute(description = "Number of type conversion hits by optimised core converters
(successful conversions)")
-    long getCoreHitCounter();
+    @ManagedAttribute(description = "Number of type conversion hits by base core converters
(successful conversions)")
+    long getBaseHitCounter();
 
     @ManagedAttribute(description = "Number of type conversion misses (no suitable type converter)")
     long getMissCounter();

http://git-wip-us.apache.org/repos/asf/camel/blob/e621beba/camel-core/src/main/java/org/apache/camel/impl/converter/BaseTypeConverterRegistry.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/impl/converter/BaseTypeConverterRegistry.java
b/camel-core/src/main/java/org/apache/camel/impl/converter/BaseTypeConverterRegistry.java
index 114c3b5..bdd9f98 100644
--- a/camel-core/src/main/java/org/apache/camel/impl/converter/BaseTypeConverterRegistry.java
+++ b/camel-core/src/main/java/org/apache/camel/impl/converter/BaseTypeConverterRegistry.java
@@ -80,7 +80,7 @@ public abstract class BaseTypeConverterRegistry extends ServiceSupport implement
     protected final LongAdder noopCounter = new LongAdder();
     protected final LongAdder attemptCounter = new LongAdder();
     protected final LongAdder missCounter = new LongAdder();
-    protected final LongAdder coreHitCounter = new LongAdder();
+    protected final LongAdder baseHitCounter = new LongAdder();
     protected final LongAdder hitCounter = new LongAdder();
     protected final LongAdder failedCounter = new LongAdder();
 
@@ -298,7 +298,7 @@ public abstract class BaseTypeConverterRegistry extends ServiceSupport
implement
         Object result = optimisedTypeConverter.convertTo(type, exchange, value);
         if (result != null) {
             if (statistics.isStatisticsEnabled()) {
-                coreHitCounter.increment();
+                baseHitCounter.increment();
             }
             if (log.isTraceEnabled()) {
                 log.trace("Using optimised core converter to convert: {} -> {}", type,
value.getClass().getCanonicalName());
@@ -733,8 +733,8 @@ public abstract class BaseTypeConverterRegistry extends ServiceSupport
implement
         }
 
         @Override
-        public long getCoreHitCounter() {
-            return coreHitCounter.longValue();
+        public long getBaseHitCounter() {
+            return baseHitCounter.longValue();
         }
 
         @Override
@@ -752,7 +752,7 @@ public abstract class BaseTypeConverterRegistry extends ServiceSupport
implement
             noopCounter.reset();
             attemptCounter.reset();
             hitCounter.reset();
-            coreHitCounter.reset();
+            baseHitCounter.reset();
             missCounter.reset();
             failedCounter.reset();
         }
@@ -769,8 +769,8 @@ public abstract class BaseTypeConverterRegistry extends ServiceSupport
implement
 
         @Override
         public String toString() {
-            return String.format("TypeConverterRegistry utilization[noop=%s, attempts=%s,
hits=%s, coreHits=%s, misses=%s, failures=%s]",
-                    getNoopCounter(), getAttemptCounter(), getHitCounter(), getCoreHitCounter(),
getMissCounter(), getFailedCounter());
+            return String.format("TypeConverterRegistry utilization[noop=%s, attempts=%s,
hits=%s, baseHits=%s, misses=%s, failures=%s]",
+                    getNoopCounter(), getAttemptCounter(), getHitCounter(), getBaseHitCounter(),
getMissCounter(), getFailedCounter());
         }
     }
 

http://git-wip-us.apache.org/repos/asf/camel/blob/e621beba/camel-core/src/main/java/org/apache/camel/management/mbean/ManagedTypeConverterRegistry.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/management/mbean/ManagedTypeConverterRegistry.java
b/camel-core/src/main/java/org/apache/camel/management/mbean/ManagedTypeConverterRegistry.java
index 76234c8..23a18df 100644
--- a/camel-core/src/main/java/org/apache/camel/management/mbean/ManagedTypeConverterRegistry.java
+++ b/camel-core/src/main/java/org/apache/camel/management/mbean/ManagedTypeConverterRegistry.java
@@ -59,8 +59,8 @@ public class ManagedTypeConverterRegistry extends ManagedService implements
Mana
         return registry.getStatistics().getHitCounter();
     }
 
-    public long getCoreHitCounter() {
-        return registry.getStatistics().getCoreHitCounter();
+    public long getBaseHitCounter() {
+        return registry.getStatistics().getBaseHitCounter();
     }
 
     public long getMissCounter() {

http://git-wip-us.apache.org/repos/asf/camel/blob/e621beba/camel-core/src/main/java/org/apache/camel/spi/TypeConverterRegistry.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/spi/TypeConverterRegistry.java b/camel-core/src/main/java/org/apache/camel/spi/TypeConverterRegistry.java
index ca426c1..2174985 100644
--- a/camel-core/src/main/java/org/apache/camel/spi/TypeConverterRegistry.java
+++ b/camel-core/src/main/java/org/apache/camel/spi/TypeConverterRegistry.java
@@ -57,7 +57,7 @@ public interface TypeConverterRegistry extends StaticService {
         /**
          * Number of successful conversions by optimised core converters
          */
-        long getCoreHitCounter();
+        long getBaseHitCounter();
 
         /**
          * Number of attempts which cannot be converted as no suitable type converter exists


Mime
View raw message