tamaya-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anat...@apache.org
Subject [2/7] incubator-tamaya-sandbox git commit: TAMAYA-218: Renamed some methods.
Date Tue, 18 Apr 2017 09:39:20 GMT
TAMAYA-218: Renamed some methods.


Project: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/commit/46e3ed0c
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/tree/46e3ed0c
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/diff/46e3ed0c

Branch: refs/heads/master
Commit: 46e3ed0caccc8cafd466740d1a1c7b0ebd3c71f0
Parents: fd26d6c
Author: anatole <anatole@apache.org>
Authored: Sat Apr 15 22:12:09 2017 +0200
Committer: anatole <anatole@apache.org>
Committed: Sat Apr 15 22:12:09 2017 +0200

----------------------------------------------------------------------
 .../apache/tamaya/usagetracker/ConfigUsage.java | 31 +++++----
 .../apache/tamaya/usagetracker/UsageStat.java   | 72 ++++++++++----------
 .../internal/DefaultConfigUsage.java            | 42 ++++++------
 .../internal/UsageTrackerFilter.java            |  4 +-
 .../tamaya/usagetracker/spi/ConfigUsageSpi.java | 18 ++---
 .../tamaya/model/ConfigUsageStatsTest.java      | 10 +--
 6 files changed, 90 insertions(+), 87 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/46e3ed0c/usagetracker/src/main/java/org/apache/tamaya/usagetracker/ConfigUsage.java
----------------------------------------------------------------------
diff --git a/usagetracker/src/main/java/org/apache/tamaya/usagetracker/ConfigUsage.java b/usagetracker/src/main/java/org/apache/tamaya/usagetracker/ConfigUsage.java
index 963dcb0..5cae8d2 100644
--- a/usagetracker/src/main/java/org/apache/tamaya/usagetracker/ConfigUsage.java
+++ b/usagetracker/src/main/java/org/apache/tamaya/usagetracker/ConfigUsage.java
@@ -33,6 +33,7 @@ public final class ConfigUsage {
 
     /** The logger used. */
     private static final Logger LOG = Logger.getLogger(ConfigUsage.class.getName());
+
     private static final String NO_USAGE_TRACKER_SPI_COMPONENT_MESSAGE = "No UsageTrackerSpi
component available.";
 
     /** The loaded usage tracking SPI. */
@@ -55,7 +56,7 @@ public final class ConfigUsage {
      * Returns a set of package names that are to be ignored when collecting usage data.
      * @return the ignored package names, not null.
      */
-    public static Set<String> getIgnoredUsagePackages(){
+    public static Set<String> getIgnoredPackages(){
         return spi().getIgnoredPackages();
     }
 
@@ -63,8 +64,8 @@ public final class ConfigUsage {
      * Adds the given packageNames to the list of packages to be ignored when collecting
usage data.
      * @param packageName the package names to be added, not null.
      */
-    public static void addIgnoredUsagePackages(String... packageName){
-        spi().addIgnoredUsagePackages(packageName);
+    public static void addIgnoredPackages(String... packageName){
+        spi().addIgnoredPackages(packageName);
     }
 
     /**
@@ -81,23 +82,23 @@ public final class ConfigUsage {
      * @param key the fully qualified configuration key, not null.
      * @return the stats collected, or null.
      */
-    public static UsageStat getUsage(String key){
-        return spi().getUsage(key);
+    public static UsageStat getSinglePropertyStats(String key){
+        return spi().getSinglePropertyStats(key);
     }
 
     /**
      * Get the recorded usage references of configuration.
      * @return the recorded usge references, never null.
      */
-    public static Collection<UsageStat> getUsages() {
-        return spi().getUsages();
+    public static Collection<UsageStat> getUsageStats() {
+        return spi().getUsageStats();
     }
 
     /**
      * Clears all collected usage statistics.
      */
-    public static void clearUsageStats() {
-        spi().clearUsageStats();
+    public static void clearStats() {
+        spi().clearStats();
     }
 
     /**
@@ -105,24 +106,24 @@ public final class ConfigUsage {
      * If usage stats collection is not activated (default), this method returns null.
      * @return the stats collected, or null.
      */
-    public static UsageStat getUsageAllProperties(){
-        return spi().getUsageAllProperties();
+    public static UsageStat getAllPropertiesStats(){
+        return spi().getAllPropertiesStats();
     }
 
     /**
      * Allows to check if usage tracking is enabled (should be disbled by default).
      * @return true, if usage tracking is enabled.
      */
-    public static boolean isUsageTrackingEnabled(){
-        return spi().isUsageTrackingEnabled();
+    public static boolean isTrackingEnabled(){
+        return spi().isTrackingEnabled();
     }
 
     /**
      * Access the usage statistics for the recorded uses of configuration.
      * @return usage info or default message.
      */
-    public static String getUsageInfo(){
-        return spi().getUsageInfo();
+    public static String getInfo(){
+        return spi().getInfo();
     }
 
 }

http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/46e3ed0c/usagetracker/src/main/java/org/apache/tamaya/usagetracker/UsageStat.java
----------------------------------------------------------------------
diff --git a/usagetracker/src/main/java/org/apache/tamaya/usagetracker/UsageStat.java b/usagetracker/src/main/java/org/apache/tamaya/usagetracker/UsageStat.java
index d04f787..8cd0236 100644
--- a/usagetracker/src/main/java/org/apache/tamaya/usagetracker/UsageStat.java
+++ b/usagetracker/src/main/java/org/apache/tamaya/usagetracker/UsageStat.java
@@ -36,24 +36,24 @@ import java.util.logging.Logger;
  * Metrics container containing access statistics for a given configuration key.
  */
 public final class UsageStat {
-    private static final Logger LOG = Logger.getLogger(UsageStat.class.getName());
+
     private static final String[] EMPTY_TRACE = new String[0];
     /**
-     * the config section.
+     * the config entry's key.
      */
     private final String key;
 
     /**
-     * Maps with usage references, key is the fully qualified package name.
+     * Maps with access references, key is the fully qualified package name.
      */
-    private final Map<String,AccessDetail> accessDetails = new ConcurrentHashMap<>();
+    private final Map<String,AccessStats> accessDetails = new ConcurrentHashMap<>();
     /**
      * The maximal length of the stacktrace stored.
      */
     private static int maxTrace = 10;
 
     /**
-     * Creates a usage metric container for a given key.
+     * Creates a usage statistics container for a given key.
      * @param key the parameter (fully qualified).
      */
     public UsageStat(String key) {
@@ -64,7 +64,7 @@ public final class UsageStat {
      * Get the maximal length of the stack traces recorded, default is 10.
      * @return the maximal length of the stack traces recorded
      */
-    public static int getMaxTraceLength(){
+    public static int getMaxTrace(){
         return UsageStat.maxTrace;
     }
 
@@ -73,12 +73,12 @@ public final class UsageStat {
      * usage. Setting it to a negative value, disabled stacktrace logging.
      * @param maxTrace the maximal recorded stack length.
      */
-    public static void setMaxTraceLength(int maxTrace){
+    public static void setMaxTrace(int maxTrace){
         UsageStat.maxTrace =maxTrace;
     }
 
     /**
-     * Get the configModel section.
+     * Get the target key of this instance.
      *
      * @return the section, never null.
      */
@@ -94,42 +94,42 @@ public final class UsageStat {
     }
 
     /**
-     * Get the detail message.
+     * Get the detail number of access points recorded.
      *
-     * @return the detail message, or null.
+     * @return the detail numer of access points, or null.
      */
     public int getReferenceCount() {
         return accessDetails.size();
     }
 
     /**
-     * Get the detail message.
+     * Get the overall number of accesses, hereby summing up the access details tracked.
      *
-     * @return the detail message, or null.
+     * @return the overall number of accesses.
      */
     public int getUsageCount() {
         int count = 0;
-        for(AccessDetail ref: accessDetails.values()){
+        for(AccessStats ref: accessDetails.values()){
             count += ref.getAccessCount();
         }
         return count;
     }
 
     /**
-     * Access a usage reference for a given class.
-     * @param type class to get usage references for, not null.
+     * Access access details for a given class.
+     * @param type class to get usage access stats for, not null.
      * @return the usage ref, if present, or null.
      */
-    public Collection<AccessDetail> getAccessDetails(Class type){
+    public Collection<AccessStats> getAccessDetails(Class type){
         return getAccessDetails(type.getName() +"\\..*");
     }
 
     /**
-     * Access a usage reference for a given package.
-     * @param pack package to get usage references for, not null.
+     * Access access details for a given package.
+     * @param pack package to get usage access stats for, not null.
      * @return the usage ref, if present, or null.
      */
-    public Collection<AccessDetail> getAccessDetails(Package pack){
+    public Collection<AccessStats> getAccessDetails(Package pack){
         return getAccessDetails(pack.getName() +"\\..*");
     }
 
@@ -138,11 +138,11 @@ public final class UsageStat {
      * matched with the tracked reference identifier, which has the form
      * {@code f.q.n.ClassName#methodName(line: 123)}.
      * @param lookupExpression the target lookup expression, not null.
-     * @return the matching references, not null.
+     * @return the matching access statistics, not null.
      */
-    public Collection<AccessDetail> getAccessDetails(String lookupExpression){
-        List<AccessDetail> result = new ArrayList<>();
-        for(AccessDetail ref:this.accessDetails.values()){
+    public Collection<AccessStats> getAccessDetails(String lookupExpression){
+        List<AccessStats> result = new ArrayList<>();
+        for(AccessStats ref:this.accessDetails.values()){
             if(ref.getAccessPoint().matches(lookupExpression)){
                 result.add(ref);
             }
@@ -152,14 +152,16 @@ public final class UsageStat {
 
     @Override
     public String toString() {
-        return "Usage Count: " + key + " -> " + getUsageCount() + '\n';
+        return "Usage Stats{\n  key=" + key + '\n'+
+                "  usageCount " + getUsageCount() + '\n' +
+                "}";
     }
 
     /**
      * Get the access details (stacktrace etc) for this reference.
      * @return return the access details, not null.
      */
-    public Collection<AccessDetail> getAccessDetails(){
+    public Collection<AccessStats> getAccessDetails(){
         return Collections.unmodifiableCollection(accessDetails.values());
     }
 
@@ -186,7 +188,7 @@ public final class UsageStat {
             List<String> trace = new ArrayList<>();
             stack:
             for (StackTraceElement ste : e.getStackTrace()) {
-                for (String ignored : ConfigUsage.getIgnoredUsagePackages()) {
+                for (String ignored : ConfigUsage.getIgnoredPackages()) {
                     if (ste.getClassName().startsWith(ignored)) {
                         continue stack;
                     }
@@ -204,19 +206,19 @@ public final class UsageStat {
                 // all ignored, take first one, with different package
                 accessPoint = "<unknown/filtered/internal>";
             }
-            AccessDetail details = getAccessDetails(accessPoint, trace.toArray(new String[trace.size()]));
+            AccessStats details = getAccessDetails(accessPoint, trace.toArray(new String[trace.size()]));
             details.trackAccess(value);
         }else{
             accessPoint = "<disabled>";
-            AccessDetail details = getAccessDetails(accessPoint, EMPTY_TRACE);
+            AccessStats details = getAccessDetails(accessPoint, EMPTY_TRACE);
             details.trackAccess(value);
         }
     }
 
-    private AccessDetail getAccessDetails(String accessPoint, String[] trace) {
-        AccessDetail details = accessDetails.get(accessPoint);
+    private AccessStats getAccessDetails(String accessPoint, String[] trace) {
+        AccessStats details = accessDetails.get(accessPoint);
         if(details==null){
-            details = new AccessDetail(key, accessPoint, trace);
+            details = new AccessStats(key, accessPoint, trace);
             accessDetails.put(accessPoint, details);
         }
         return details;
@@ -225,7 +227,7 @@ public final class UsageStat {
     /**
      * Class modelling the access details tracked per detailed item, e.g. per class in the
owning package.
      */
-    public static final class AccessDetail {
+    public static final class AccessStats {
         private String key;
         private AtomicLong accessCount = new AtomicLong();
         private long lastAccessTS;
@@ -234,7 +236,7 @@ public final class UsageStat {
         private String accessPoint;
         private Map<Long, PropertyValue> trackedValues;
 
-        public AccessDetail(String key, String accessPoint, String[] stackTrace){
+        public AccessStats(String key, String accessPoint, String[] stackTrace){
             this.key = Objects.requireNonNull(key);
             this.accessPoint = Objects.requireNonNull(accessPoint);
             this.stackTrace = stackTrace.clone();
@@ -299,14 +301,14 @@ public final class UsageStat {
 
         @Override
         public String toString() {
-            return "AccessDetails{" +
+            return "AccessStats{" +
                     "key=" + key +
                     ", accessCount=" + accessCount +
                     ", lastAccessTS=" + lastAccessTS +
                     ", firstAccessTS=" + firstAccessTS +
-                    ", stackTrace=" + Arrays.toString(stackTrace) +
                     ", accessPoint='" + accessPoint + '\'' +
                     ", trackedValues=" + trackedValues +
+                    ", stackTrace=" + Arrays.toString(stackTrace) +
                     '}';
         }
     }

http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/46e3ed0c/usagetracker/src/main/java/org/apache/tamaya/usagetracker/internal/DefaultConfigUsage.java
----------------------------------------------------------------------
diff --git a/usagetracker/src/main/java/org/apache/tamaya/usagetracker/internal/DefaultConfigUsage.java
b/usagetracker/src/main/java/org/apache/tamaya/usagetracker/internal/DefaultConfigUsage.java
index dc6f8ed..34e1fa4 100644
--- a/usagetracker/src/main/java/org/apache/tamaya/usagetracker/internal/DefaultConfigUsage.java
+++ b/usagetracker/src/main/java/org/apache/tamaya/usagetracker/internal/DefaultConfigUsage.java
@@ -35,13 +35,13 @@ import java.util.Set;
 import java.util.concurrent.ConcurrentHashMap;
 
 /**
- * Created by atsticks on 29.04.16.
+ * Default implementation of the module's SPI.
  */
 public class DefaultConfigUsage implements ConfigUsageSpi {
 
     private Set<String> ignoredPackages = new HashSet<>();
 
-    private Map<String, UsageStat> usages = new ConcurrentHashMap<>();
+    private Map<String, UsageStat> stats = new ConcurrentHashMap<>();
 
     /** By default usage tracking is not enabled. */
     private boolean usageTrackingEnabled = initEnabled();
@@ -78,7 +78,7 @@ public class DefaultConfigUsage implements ConfigUsageSpi {
     }
 
     @Override
-    public boolean isUsageTrackingEnabled(){
+    public boolean isTrackingEnabled(){
         return usageTrackingEnabled;
     }
 
@@ -88,18 +88,18 @@ public class DefaultConfigUsage implements ConfigUsageSpi {
     }
 
     @Override
-    public void addIgnoredUsagePackages(String... packageName) {
+    public void addIgnoredPackages(String... packageName) {
 
     }
 
     @Override
-    public UsageStat getUsage(String key) {
-        return this.usages.get(key);
+    public UsageStat getSinglePropertyStats(String key) {
+        return this.stats.get(key);
     }
 
     @Override
-    public UsageStat getUsageAllProperties() {
-        return this.usages.get("<<all>>");
+    public UsageStat getAllPropertiesStats() {
+        return this.stats.get("<<all>>");
     }
 
     /**
@@ -107,25 +107,25 @@ public class DefaultConfigUsage implements ConfigUsageSpi {
      * @return the recorded usge references, never null.
      */
     @Override
-    public Collection<UsageStat> getUsages() {
-        return usages.values();
+    public Collection<UsageStat> getUsageStats() {
+        return stats.values();
     }
 
     @Override
-    public void trackAllPropertiesAccess(ConfigurationContext context){
-        trackSingleKeyAccess(PropertyValue.of("<<all>>","<not stored>","-"),
context);
+    public void recordAllPropertiesAccess(ConfigurationContext context){
+        recordSingleKeyAccess(PropertyValue.of("<<all>>","<not stored>","-"),
context);
     }
 
     @Override
-    public void trackSingleKeyAccess(PropertyValue value, ConfigurationContext context){
+    public void recordSingleKeyAccess(PropertyValue value, ConfigurationContext context){
         // Ignore meta-entries
-        if(!isUsageTrackingEnabled()){
+        if(!isTrackingEnabled()){
             return;
         }
-        UsageStat usage = this.usages.get(value.getKey());
+        UsageStat usage = this.stats.get(value.getKey());
         if(usage==null){
             usage = new UsageStat(value.getKey());
-            this.usages.put(value.getKey(), usage);
+            this.stats.put(value.getKey(), usage);
         }
         usage.trackUsage(value);
     }
@@ -135,12 +135,12 @@ public class DefaultConfigUsage implements ConfigUsageSpi {
      * Access the usage statistics for the recorded uses of configuration.
      */
     @Override
-    public String getUsageInfo(){
+    public String getInfo(){
         StringBuilder b = new StringBuilder();
         b.append("Apache Tamaya Configuration Usage Metrics\n");
         b.append("=========================================\n");
         b.append("DATE: ").append(new Date()).append("\n\n");
-        List<UsageStat> usages = new ArrayList<>(getUsages());
+        List<UsageStat> usages = new ArrayList<>(getUsageStats());
         Collections.sort(usages, new Comparator<UsageStat>() {
             @Override
             public int compare(UsageStat k1, UsageStat k2) {
@@ -152,7 +152,7 @@ public class DefaultConfigUsage implements ConfigUsageSpi {
             b.append(usageCount);
             b.append("       ".substring(0, 7-usageCount.length()));
             b.append(usage.getKey()).append(":\n");
-            for(UsageStat.AccessDetail details: usage.getAccessDetails()) {
+            for(UsageStat.AccessStats details: usage.getAccessDetails()) {
                 String accessCount = String.valueOf(details.getAccessCount());
                     b.append("  - ").append(accessCount);
                     b.append("      ".substring(0, 6-usageCount.length()));
@@ -171,8 +171,8 @@ public class DefaultConfigUsage implements ConfigUsageSpi {
     }
 
     @Override
-    public void clearUsageStats() {
-        this.usages.clear();
+    public void clearStats() {
+        this.stats.clear();
     }
 
 }

http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/46e3ed0c/usagetracker/src/main/java/org/apache/tamaya/usagetracker/internal/UsageTrackerFilter.java
----------------------------------------------------------------------
diff --git a/usagetracker/src/main/java/org/apache/tamaya/usagetracker/internal/UsageTrackerFilter.java
b/usagetracker/src/main/java/org/apache/tamaya/usagetracker/internal/UsageTrackerFilter.java
index 9859ff2..c9839ac 100644
--- a/usagetracker/src/main/java/org/apache/tamaya/usagetracker/internal/UsageTrackerFilter.java
+++ b/usagetracker/src/main/java/org/apache/tamaya/usagetracker/internal/UsageTrackerFilter.java
@@ -38,9 +38,9 @@ public class UsageTrackerFilter implements PropertyFilter{
     public PropertyValue filterProperty(PropertyValue value, FilterContext context) {
             ConfigUsageSpi tracker = ServiceContextManager.getServiceContext().getService(ConfigUsageSpi.class);
         if (context.isSinglePropertyScoped()) {
-            tracker.trackSingleKeyAccess(value, context.getContext());
+            tracker.recordSingleKeyAccess(value, context.getContext());
         } else {
-            tracker.trackAllPropertiesAccess(context.getContext());
+            tracker.recordAllPropertiesAccess(context.getContext());
         }
         return value;
     }

http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/46e3ed0c/usagetracker/src/main/java/org/apache/tamaya/usagetracker/spi/ConfigUsageSpi.java
----------------------------------------------------------------------
diff --git a/usagetracker/src/main/java/org/apache/tamaya/usagetracker/spi/ConfigUsageSpi.java
b/usagetracker/src/main/java/org/apache/tamaya/usagetracker/spi/ConfigUsageSpi.java
index 95b34b6..46fd767 100644
--- a/usagetracker/src/main/java/org/apache/tamaya/usagetracker/spi/ConfigUsageSpi.java
+++ b/usagetracker/src/main/java/org/apache/tamaya/usagetracker/spi/ConfigUsageSpi.java
@@ -41,7 +41,7 @@ public interface ConfigUsageSpi {
      * Allows to check if usage tracking is enabled (should be disbled by default).
      * @return true, if usage tracking is enabled.
      */
-    boolean isUsageTrackingEnabled();
+    boolean isTrackingEnabled();
 
     /**
      * Get the list of packages, which are not evaluated for tracking configuration access
and usage statistics.
@@ -53,7 +53,7 @@ public interface ConfigUsageSpi {
      * Adds the given packageNames to the list of packages to be ignored when collecting
usage data.
      * @param packageName the package names to be added, not null.
      */
-    void addIgnoredUsagePackages(String... packageName);
+    void addIgnoredPackages(String... packageName);
 
     /**
      * Access the usage statistics for a given key. If usage stats collection is not
@@ -61,27 +61,27 @@ public interface ConfigUsageSpi {
      * @param key the fully qualified configuration key, not null.
      * @return the stats collected, or null.
      */
-    UsageStat getUsage(String key);
+    UsageStat getSinglePropertyStats(String key);
 
     /**
      * Access the usage statistics for accessing {@link org.apache.tamaya.Configuration#getProperties()}.
      * If usage stats collection is not activated (default), this method returns null.
      * @return the stats collected, or null.
      */
-    UsageStat getUsageAllProperties();
+    UsageStat getAllPropertiesStats();
 
     /**
      * Get the recorded usage references of configuration.
      * @return the recorded usge references, never null.
      */
-    Collection<UsageStat> getUsages();
+    Collection<UsageStat> getUsageStats();
 
     /**
      * Track the access of {@code Configuration#getProperties()} for
      * usage statistics.
      * @param context the corresponding context.
      */
-    void trackAllPropertiesAccess(ConfigurationContext context);
+    void recordAllPropertiesAccess(ConfigurationContext context);
 
     /**
      * Track the access of {@code Configuration#get(String)} for
@@ -89,16 +89,16 @@ public interface ConfigUsageSpi {
      * @param context the corresponding context.
      * @param value value to track for
      */
-    void trackSingleKeyAccess(PropertyValue value, ConfigurationContext context);
+    void recordSingleKeyAccess(PropertyValue value, ConfigurationContext context);
 
     /**
      * Access the usage statistics for the recorded uses of configuration.
      * @return usage statistics info
      */
-    String getUsageInfo();
+    String getInfo();
 
     /**
      * Clears all collected usage statistics.
      */
-    void clearUsageStats();
+    void clearStats();
 }

http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/46e3ed0c/usagetracker/src/test/java/org/apache/tamaya/model/ConfigUsageStatsTest.java
----------------------------------------------------------------------
diff --git a/usagetracker/src/test/java/org/apache/tamaya/model/ConfigUsageStatsTest.java
b/usagetracker/src/test/java/org/apache/tamaya/model/ConfigUsageStatsTest.java
index a16a62e..1fcdee9 100644
--- a/usagetracker/src/test/java/org/apache/tamaya/model/ConfigUsageStatsTest.java
+++ b/usagetracker/src/test/java/org/apache/tamaya/model/ConfigUsageStatsTest.java
@@ -36,7 +36,7 @@ public class ConfigUsageStatsTest {
         ConfigUsage.enableUsageTracking(true);
         TestConfigAccessor.readConfiguration();
         Configuration config = ConfigurationProvider.getConfiguration();
-        String info = ConfigUsage.getUsageInfo();
+        String info = ConfigUsage.getInfo();
         assertFalse(info.contains("java.version"));
         assertNotNull(info);
         config = TestConfigAccessor.readConfiguration();
@@ -45,7 +45,7 @@ public class ConfigUsageStatsTest {
         TestConfigAccessor.readProperty(config, "java.version");
         TestConfigAccessor.readProperty(config, "java.version");
         config.get("java.version");
-        info = ConfigUsage.getUsageInfo();
+        info = ConfigUsage.getInfo();
         System.out.println(info);
         assertTrue(info.contains("java.version"));
         assertNotNull(info);
@@ -55,10 +55,10 @@ public class ConfigUsageStatsTest {
     @Test
     public void testUsageWhenDisabled(){
         ConfigUsage.enableUsageTracking(false);
-        ConfigUsage.clearUsageStats();
+        ConfigUsage.clearStats();
         TestConfigAccessor.readConfiguration();
         Configuration config = ConfigurationProvider.getConfiguration();
-        String info = ConfigUsage.getUsageInfo();
+        String info = ConfigUsage.getInfo();
         assertNotNull(info);
         assertFalse(info.contains("java.version"));
         config = TestConfigAccessor.readConfiguration();
@@ -67,7 +67,7 @@ public class ConfigUsageStatsTest {
         TestConfigAccessor.readProperty(config, "java.version");
         TestConfigAccessor.readProperty(config, "java.version");
         config.get("java.version");
-        info = ConfigUsage.getUsageInfo();
+        info = ConfigUsage.getInfo();
         assertFalse(info.contains("java.version"));
         assertNotNull(info);
         ConfigUsage.enableUsageTracking(false);


Mime
View raw message