Examples of allValues()


Examples of com.webobjects.foundation.NSMutableDictionary.allValues()

  public static void logStatisticsForOperation(Logger statsLog, String operation) {
    if(statsLog.isDebugEnabled()) {
      NSMutableDictionary statistics = ERXStats.statistics();
      if (statistics != null) {
        synchronized (statistics) {
          NSArray values = ERXArrayUtilities.sortedArraySortedWithKey(statistics.allValues(), operation);
          if (values.count() > 0) {
            Long startTime = (Long) ERXThreadStorage.valueForKey(ERXStats.STATS_START_TIME_KEY);
            Long lastTime = (Long) ERXThreadStorage.valueForKey(ERXStats.STATS_LAST_TIME_KEY);
            long currentTime = System.currentTimeMillis();
            String result = NSPropertyListSerialization.stringFromPropertyList(values);
View Full Code Here

Examples of com.webobjects.foundation.NSMutableDictionary.allValues()

            // result = result.replaceAll("\\n\\t", "\n\t\t");
            // result = result.replaceAll("\\n", "\n\t\t");
            statsLog.debug(
                (startTime != null ? "Time since init " + (currentTime - startTime.longValue()) + " ms": "" ) +
                (lastTime != null ? ", last log " + (currentTime - lastTime.longValue()) + " ms": "" ) +
                ", total cnt/sum: " + statistics.allValues().valueForKeyPath("@sum.count") + "/" + statistics.allValues().valueForKeyPath("@sum.sum") +
                " (cnt/sum : min/max/avg|trace cnt -> key) = " + result);
            ERXThreadStorage.takeValueForKey(Long.valueOf(currentTime), ERXStats.STATS_LAST_TIME_KEY);
          }
        }
      }
View Full Code Here

Examples of com.webobjects.foundation.NSMutableDictionary.allValues()

            // result = result.replaceAll("\\n\\t", "\n\t\t");
            // result = result.replaceAll("\\n", "\n\t\t");
            statsLog.debug(
                (startTime != null ? "Time since init " + (currentTime - startTime.longValue()) + " ms": "" ) +
                (lastTime != null ? ", last log " + (currentTime - lastTime.longValue()) + " ms": "" ) +
                ", total cnt/sum: " + statistics.allValues().valueForKeyPath("@sum.count") + "/" + statistics.allValues().valueForKeyPath("@sum.sum") +
                " (cnt/sum : min/max/avg|trace cnt -> key) = " + result);
            ERXThreadStorage.takeValueForKey(Long.valueOf(currentTime), ERXStats.STATS_LAST_TIME_KEY);
          }
        }
      }
View Full Code Here

Examples of org.HdrHistogram.AbstractHistogram.allValues()

         double percentile = Percentile.getPercentile(args);
         return (T) new Percentile(histogram.getValueAtPercentile(percentile));
      } else if (clazz == Histogram.class) {
         int buckets = Histogram.getBuckets(args);
         double percentile = Histogram.getPercentile(args);
         AbstractHistogram.AllValues values = histogram.allValues();
         ArrayList<Long> ranges = new ArrayList<>();
         ArrayList<Long> counts = new ArrayList<>();
         long min = Math.max(histogram.getMinValue(), 1);
         long max = Math.max(histogram.getValueAtPercentile(percentile), 1);
         if (max < min) max = Math.max(histogram.getMaxValue(), min + 1);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.