Package org.apache.uima.aae.monitor.statistics

Examples of org.apache.uima.aae.monitor.statistics.LongNumericStatistic


    Threshold threshold = getThreshold(aThresholdToCheck, endpoint);
    if (threshold != null) {
      Monitor monitor = controller.getMonitor();
      Statistic statistic = null;
      if ((statistic = monitor.getStatistic(endpoint, aThresholdToCheck)) == null) {
        statistic = new LongNumericStatistic(aThresholdToCheck);
        monitor.addStatistic(endpoint, statistic);
      }
      if (statistic instanceof LongNumericStatistic) {
        ((LongNumericStatistic) statistic).increment();
        if (threshold.exceeded(((LongNumericStatistic) statistic).getValue())) {
View Full Code Here


    if (aThreshold != null) {
      Monitor monitor = controller.getMonitor();
      Statistic statistic = null;

      if ((statistic = monitor.getStatistic(endpoint, aThresholdToCheck)) == null) {
        statistic = new LongNumericStatistic(aThresholdToCheck);
        monitor.addStatistic(endpoint, statistic);
      }
      if (Monitor.GetMetaErrorRetryCount.equals(aThresholdToCheck)
              || Monitor.ProcessErrorRetryCount.equals(aThresholdToCheck)) {
        return aThreshold.maxRetriesExceeded(((LongNumericStatistic) statistic).getValue());
View Full Code Here

  protected synchronized void incrementStatistic(Monitor aMonitor, String aComponentName,
          String aStatistic) {
    Statistic statistic = aMonitor.getStatistic(aComponentName, aStatistic);
    if (statistic == null) {
      statistic = new LongNumericStatistic(aStatistic);
      aMonitor.addStatistic(aComponentName, statistic);
    }

    if (statistic instanceof LongNumericStatistic) {
      ((LongNumericStatistic) statistic).increment();
View Full Code Here

    return false;
  }

  protected synchronized boolean exceedsThresholdWithinWindow(Monitor aMonitor, String aStat,
          String aComponent, Threshold aThreshold) {
    LongNumericStatistic currentErrorCountStat = aMonitor
            .getLongNumericStatistic(aComponent, aStat);
    LongNumericStatistic currentProcessCountStat = aMonitor.getLongNumericStatistic(aComponent,
            Monitor.ProcessCount);
    long numberOfErrors = currentErrorCountStat.getValue();
    // Check if threshold exceeded
    if (numberOfErrors > 0 && aThreshold.getThreshold() > 0
            && numberOfErrors % aThreshold.getThreshold() == 0) {
      return true;
    }
    // Check if reached end of window. If so, begin counting against a new window
    if (aThreshold.getThreshold() > 0 && aThreshold.getWindow() > 0
            && currentProcessCountStat.getValue() % aThreshold.getWindow() == 0) {
      aMonitor.resetCountingStatistic(aComponent, aStat);
    }
    return false;
  }
View Full Code Here

    entry = getController().getInProcessCache().register(cas, aMessageContext, deserSharedData,
            casReferenceId, marker, acceptsDeltaCas);

    long timeToDeserializeCAS = getController().getCpuTime() - t1;
    getController().incrementDeserializationTime(timeToDeserializeCAS);
    LongNumericStatistic statistic;
    if ((statistic = getController().getMonitor().getLongNumericStatistic("",
            Monitor.TotalDeserializeTime)) != null) {
      statistic.increment(timeToDeserializeCAS);
    }
    if (UIMAFramework.getLogger(CLASS_NAME).isLoggable(Level.FINE)) {
      UIMAFramework.getLogger(CLASS_NAME).logrb(Level.FINE, CLASS_NAME.getName(),
              "handleProcessRequestWithXMI", UIMAEE_Constants.JMS_LOG_RESOURCE_BUNDLE,
              "UIMAEE_deserialize_cas_time_FINE",
View Full Code Here

      } finally {
        bos.close();
      }
    }

    LongNumericStatistic statistic;
    if ((statistic = getAnalysisEngineController().getMonitor().getLongNumericStatistic("",
            Monitor.TotalSerializeTime)) != null) {
      statistic.increment(getAnalysisEngineController().getCpuTime() - start);
    }

    return serializedCas;
  }
View Full Code Here

      getController().getServicePerformance().incrementCasDeserializationTime(timeToDeserializeCAS);

      ServicePerformance casStats = getController().getCasStatistics(casReferenceId);
      casStats.incrementCasDeserializationTime(timeToDeserializeCAS);
      LongNumericStatistic statistic;
      if ((statistic = getController().getMonitor().getLongNumericStatistic("",
              Monitor.TotalDeserializeTime)) != null) {
        statistic.increment(timeToDeserializeCAS);
      }

      computeStats(aMessageContext, casReferenceId);

      // Send CAS for processing when all delegates reply
View Full Code Here

    Endpoint endpoint = aMessageContext.getEndpoint();
    if (endpoint != null && getController() instanceof AggregateAnalysisEngineController) {
      try {
        String delegateKey = ((AggregateAnalysisEngineController) getController())
                .lookUpDelegateKey(endpoint.getEndpoint());
        LongNumericStatistic stat = getController().getMonitor().getLongNumericStatistic(
                delegateKey, Monitor.ProcessCount);
        stat.increment();
      } catch (Exception e) {
        if (UIMAFramework.getLogger(CLASS_NAME).isLoggable(Level.INFO)) {
            UIMAFramework.getLogger(CLASS_NAME).logrb(Level.INFO, CLASS_NAME.getName(),
                    "incrementDelegateProcessCount", UIMAEE_Constants.JMS_LOG_RESOURCE_BUNDLE,
                    "UIMAEE_delegate_key_for_endpoint_not_found__INFO", new Object[] { getController().getComponentName(), endpoint.getEndpoint() });
View Full Code Here

      componentStatistics.put(aComponentName, stats);
    }
  }

  public LongNumericStatistic getLongNumericStatistic(String aComponent, String aStatisticName) {
    LongNumericStatistic countStat = (LongNumericStatistic) this.getStatistic(aComponent,
            aStatisticName);
    if (countStat == null) {
      countStat = new LongNumericStatistic(aStatisticName);
      addStatistic(aComponent, countStat);

    }
    // return (LongNumericStatistic) this.getStatistic(aComponent, aStatisticName);
    return countStat;
View Full Code Here

    // return (LongNumericStatistic) this.getStatistic(aComponent, aStatisticName);
    return countStat;
  }

  public synchronized void incrementCount(String aComponent, String aStatisticName) {
    LongNumericStatistic countStat = getLongNumericStatistic(aComponent, aStatisticName);
    if (countStat == null) {
      countStat = new LongNumericStatistic(aStatisticName);
      addStatistic(aComponent, countStat);
    }
    countStat.increment();

  }
View Full Code Here

TOP

Related Classes of org.apache.uima.aae.monitor.statistics.LongNumericStatistic

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.