Package org.radargun.stats.representation

Examples of org.radargun.stats.representation.DefaultOutcome


      return summary;
   }

   private void addRepresentations(Statistics summary, int threadCount, Map<String, String> rowData, String operationName, OperationStats os) {
      //Map.Entry<Integer, List<Statistics>> slaveStats = ; Map.Entry<String, OperationStats> os = ;
      DefaultOutcome defaultOutcome = os.getRepresentation(DefaultOutcome.class);
      if (defaultOutcome != null) {
         if (defaultOutcome.requests == 0) return;
         rowData.put(operationName + ".Requests", String.valueOf(defaultOutcome.requests));
         rowData.put(operationName + ".Errors", String.valueOf(defaultOutcome.errors));
         rowData.put(operationName + ".ResponseTimeMax", String.valueOf(defaultOutcome.responseTimeMax));
View Full Code Here


      OperationStats nos = ns.getOperationsStats().get(operation);
      OperationStats tos = totalStats.getOperationsStats().get(operation);
      if (nos == null) {
         return tos != null;
      }
      DefaultOutcome ndo = nos.getRepresentation(DefaultOutcome.class);
      DefaultOutcome tdo = tos.getRepresentation(DefaultOutcome.class);
      if (ndo == null) {
         return tdo != null;
      }
      double requestsAverage = getRequestsAverage(operation);
      return ndo.requests < requestsAverage * 4 / 5 || requestsAverage > tdo.requests * 5 / 4;
View Full Code Here

      int slaveStatsCount = 0;
      for (Statistics ns : nodeStats) {
         if (ns == null) continue;
         OperationStats operationStats = ns.getOperationsStats().get(operation);
         if (operationStats != null) {
            DefaultOutcome defaultOutcome = operationStats.getRepresentation(DefaultOutcome.class);
            if (defaultOutcome != null) {
               requests += defaultOutcome.requests;
               slaveStatsCount++;
            }
         }
View Full Code Here

   @Override
   public <T> T getRepresentation(Class<T> clazz, Object... args) {
      AbstractHistogram histogram = getHistogram();
      if (clazz == DefaultOutcome.class) {
         return (T) new DefaultOutcome(histogram.getTotalCount(), errors, histogram.getMean(), histogram.getMaxValue());
      } else if (clazz == MeanAndDev.class) {
         return (T) new MeanAndDev(histogram.getMean(), histogram.getStdDeviation());
      } else if (clazz == Throughput.class) {
         return (T) Throughput.compute(histogram.getTotalCount(), histogram.getMean(), args);
      } else if (clazz == Percentile.class) {
View Full Code Here

      });
   }

   private void writeRepresentations(OperationStats operationStats, String operation, int cluster, int iteration, String node,
                                     int threads, long period, boolean hasPercentiles, boolean hasHistograms, boolean gray, boolean suspect) {
      DefaultOutcome defaultOutcome = operationStats == null ? null : operationStats.getRepresentation(DefaultOutcome.class);
      Throughput throughput = operationStats == null ? null : operationStats.getRepresentation(Throughput.class, threads, period);
      MeanAndDev meanAndDev = operationStats == null ? null : operationStats.getRepresentation(MeanAndDev.class);
      Histogram histogram = operationStats == null ? null : operationStats.getRepresentation(Histogram.class, configuration.histogramBuckets, configuration.histogramPercentile);

      String rowStyle = suspect ? "background-color: #FFBBBB; " : (gray ? "background-color: #F0F0F0; " : "");
View Full Code Here

      @Override
      public boolean evaluate(int threads, Statistics statistics) {
         OperationStats stats = statistics.getOperationsStats().get(on);
         if (stats == null) throw new IllegalStateException("No statistics for operation " + on);
         DefaultOutcome outcome = stats.getRepresentation(DefaultOutcome.class);
         if (outcome == null) throw new IllegalStateException("Cannot determine mean from " + stats);
         log.info("Mean is " + Utils.prettyPrintTime((long) outcome.responseTimeMean, TimeUnit.NANOSECONDS) + PropertyHelper.toString(this));
         if (below != null) return outcome.responseTimeMean < below;
         if (over != null) return outcome.responseTimeMean > over;
         throw new IllegalStateException();
View Full Code Here

      @Override
      public boolean evaluate(int threads, Statistics statistics) {
         OperationStats stats = statistics.getOperationsStats().get(on);
         if (stats == null) throw new IllegalStateException("No statistics for operation " + on);
         DefaultOutcome outcome = stats.getRepresentation(DefaultOutcome.class);
         if (outcome == null) throw new IllegalStateException("Cannot determine request count from " + stats);
         log.info("Executed " + outcome.requests + " reqs " + PropertyHelper.toString(this));
         if (below != null) return outcome.requests < below;
         if (over != null) return outcome.requests > over;
         throw new IllegalStateException();
View Full Code Here

      @Override
      public boolean evaluate(int threads, Statistics statistics) {
         OperationStats stats = statistics.getOperationsStats().get(on);
         if (stats == null) throw new IllegalStateException("No statistics for operation " + on);
         DefaultOutcome outcome = stats.getRepresentation(DefaultOutcome.class);
         if (outcome == null) throw new IllegalStateException("Cannot determine error count from " + stats);
         log.info("Encountered " + outcome.errors + " errors " + PropertyHelper.toString(this));
         if (totalBelow != null) return outcome.errors < totalBelow;
         if (totalOver != null) return outcome.errors > totalOver;
         if (percentBelow != null) return outcome.errors * 100 < outcome.requests * percentBelow;
 
View Full Code Here

         long requests = full ? responseTimes.length : pos;
         for (int i = 0; i < requests; ++i) {
            responseTimeSum += responseTimes[i];
            max = Math.max(max, responseTimes[i]);
         }
         return (T) new DefaultOutcome(requests, 0, (double) responseTimeSum / requests, max);
      } else if (clazz == Throughput.class) {
         long responseTimeSum = 0;
         long requests = full ? responseTimes.length : pos;
         for (int i = 0; i < requests; ++i) {
            responseTimeSum += responseTimes[i];
View Full Code Here

   }

   @Override
   public <T> T getRepresentation(Class<T> clazz, Object... args) {
      if (clazz == DefaultOutcome.class) {
         return (T) new DefaultOutcome(requests, errors, responseTimeMean, responseTimeMax);
      } else if (clazz == MeanAndDev.class) {
         return (T) getMeanAndDev();
      } else if (clazz == Throughput.class) {
         return (T) Throughput.compute(requests, responseTimeMean, args);
      } else if (clazz == BoxAndWhiskers.class) {
View Full Code Here

TOP

Related Classes of org.radargun.stats.representation.DefaultOutcome

Copyright © 2018 www.massapicom. 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.