Package org.shiftone.jrat.core

Examples of org.shiftone.jrat.core.MethodKeyAccumulator


  public void populateTable(StackTreeNode nodeModel, Map map) {

    if (!nodeModel.isRootNode()) {
      //
      MethodKey methodKey = nodeModel.getMethodKey();
      MethodKeyAccumulator accumulator = (MethodKeyAccumulator) map.get(methodKey);
      if (accumulator == null) {
        accumulator = new MethodKeyAccumulator(methodKey);
        map.put(methodKey, accumulator);
      }
      accumulator.combine(nodeModel);
    }
    for (int i = 0; i < nodeModel.getChildCount(); i++) {
      populateTable(nodeModel.getStackTreeNodeAt(i), map);
    }
  }
View Full Code Here


    return COLUMN_NAMES[i];
  }

  public Object getColumnValue(Object object, int columnIndex) {

    MethodKeyAccumulator accumulator = (MethodKeyAccumulator) object;
    if (accumulator == null) {
      return null;
    }
    if (accumulator.getMethodKey() == null) {
      return "?method?";
    }
    switch (columnIndex) {
    case 0:
      return accumulator.getMethodKey().getClassName();
    case 1:
      return accumulator.getMethodKey().getMethodName();
    case 2:
      return accumulator.getMethodKey().getSignature();
    case 3:
      return new Long(accumulator.getTotalEnters());
    case 4:
      return new Long(accumulator.getTotalExits());
    case 5:
      return new Long(accumulator.getTotalErrors());
    case 6:
      return new Long(accumulator.getTotalDuration(TimeUnit.MS));
    case 7:
      return accumulator.getAverageDuration(TimeUnit.MS);
    case 8:
      return accumulator.getStdDeviation();
    case 9:
      return accumulator.getMinDuration(TimeUnit.MS);
    case 10:
      return accumulator.getMaxDuration(TimeUnit.MS);
    }
    throw new IllegalStateException();
  }
View Full Code Here

      return inverse ? !result : result;
    }

    public boolean matches(Object object) {

      MethodKeyAccumulator accumulator = (MethodKeyAccumulator) object;
      MethodKey methodKey = accumulator.getMethodKey();
      switch (field) {
      case FIELD_CLASS:
        return invertIfNeeded(matcher.isMatch(methodKey.getClassName()));
      case FIELD_METHOD:
        return invertIfNeeded(matcher.isMatch(methodKey.getMethodName()));
View Full Code Here

  }

  public void recalculate() {

    updates.beginEvent();
    MethodKeyAccumulator newTotals = new MethodKeyAccumulator(methodKey);
    for (int i = 0; i < eventList.size(); i++) {
      MethodKeyAccumulator accumulator = (MethodKeyAccumulator) eventList.get(i);
      newTotals.combine(accumulator);
    }
    this.totals = newTotals;
    updates.addUpdate(0);
    updates.commitEvent();
View Full Code Here

      // throw the first 2 lines away
      // lineReader.readLine();
      lineReader.readLine();
      DelimitedReader delimitedReader = new DelimitedReader(lineReader, StatOutput.getDelimitedFormat());
      while (delimitedReader.next()) {
        MethodKeyAccumulator accumulator = readAccumulator(delimitedReader);
        methodKeyAccumulators.add(accumulator);
      }
      context.setComponent(new StatsViewerPanel(methodKeyAccumulators));
    } finally {
      IOUtil.close(reader);
View Full Code Here

    long totalOfSquares = record.getLong(StatOutput.FIELD_SUM_OF_SQUARES);
    int maxConcurThreads = (int) record.getLong(StatOutput.FIELD_MAX_CONCUR_THREADS);
    long maxDuration = toLong(record.getNumber(StatOutput.FIELD_MAX_DURATION));
    long minDuration = toLong(record.getNumber(StatOutput.FIELD_MIN_DURATION));
    MethodKey methodKey = new MethodKey(className, methodName, signature);
    return new MethodKeyAccumulator(methodKey,
        totalEnters,
        totalExits,
        totalErrors,
        totalDuration,
        totalOfSquares,
View Full Code Here

TOP

Related Classes of org.shiftone.jrat.core.MethodKeyAccumulator

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.