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

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


//      UIMAFramework.getLogger(CLASS_NAME).logrb(Level.FINEST, CLASS_NAME.getName(),
//                  "serializeCAS", JmsConstants.JMS_LOG_RESOURCE_BUNDLE, "UIMAJMS_dump_serialized_cas__FINEST",
//                  new Object[] {aCasReferenceId, serializedCas});
//    }

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

   
    return serializedCas;
  }
View Full Code Here


  public void initialize() throws AsynchAEException
  {
    Statistic statistic = null;
    if ( (statistic = getMonitor().getLongNumericStatistic("",Monitor.ProcessCount)) == null )
    {
      statistic = new LongNumericStatistic(Monitor.ProcessCount);
      getMonitor().addStatistic("", statistic);
    }
    if ( (statistic = getMonitor().getLongNumericStatistic("",Monitor.ProcessErrorCount)) == null )
    {
      statistic = new LongNumericStatistic(Monitor.ProcessErrorCount);
      getMonitor().addStatistic("", statistic);
    }
    if ( (statistic = getMonitor().getLongNumericStatistic("",Monitor.ProcessErrorRetryCount)) == null )
    {
      statistic = new LongNumericStatistic(Monitor.ProcessErrorRetryCount);
      getMonitor().addStatistic("", statistic);
    }

  }
View Full Code Here

          t1 = System.nanoTime();
        XmiSerializationSharedData deserSharedData = new XmiSerializationSharedData();
        UimaSerializer.deserializeCasFromXmi(xmi, cas, deserSharedData, true, -1);
       
        long timeToDeserializeCAS = System.nanoTime() - t1;
        LongNumericStatistic statistic;
        if ( (statistic = getController().getMonitor().getLongNumericStatistic("",Monitor.TotalDeserializeTime)) != null )
        {
          statistic.increment(timeToDeserializeCAS);
        }

        UIMAFramework.getLogger(CLASS_NAME).logrb(Level.FINE, CLASS_NAME.getName(),
            "handleProcessRequestWithXMI", UIMAEE_Constants.JMS_LOG_RESOURCE_BUNDLE, "UIMAEE_deserialize_cas_time_FINE",
            new Object[] { timeToDeserializeCAS / 1000 });
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 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

    return (Statistics)componentStatistics.get( aComponentName );
  }

  public synchronized void resetCountingStatistic(String aComponent,String aStatisticName)
  {
    LongNumericStatistic countStat = getLongNumericStatistic(aComponent, aStatisticName);
    if ( countStat != null )
    {
      synchronized( countStat)
      {
//        System.out.println("Resetting Statistic:"+aStatisticName+" For Component:"+aComponent);
        countStat.reset();
      }
    }
  }
View Full Code Here

        return (Statistic)stats.get(aStatisticName );
      }
    }
    else
    {
      LongNumericStatistic countStat = new LongNumericStatistic(aStatisticName);
      addStatistic(aComponentName, countStat);
      return (Statistic)countStat;
    }

    return null;
View Full Code Here

                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);

      cancelTimer(aMessageContext, casReferenceId, true);
View Full Code Here

    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) {}
    }
   
  }
View Full Code Here

    {
      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();
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.