Package org.apache.uima.util

Examples of org.apache.uima.util.ProcessTraceEvent


  }

  protected ProcessTraceEvent getEvent(List<ProcessTraceEvent> aEvents, String aComponentName, String aType) {
    Iterator<ProcessTraceEvent> it = aEvents.iterator();
    while (it.hasNext()) {
      ProcessTraceEvent event = (ProcessTraceEvent) it.next();
      if (aComponentName.equals(event.getComponentName()) && aType.equals(event.getType())) {
        return event;
      } else {
        ProcessTraceEvent matchingSubEvt = getEvent(event.getSubEvents(), aComponentName, aType);
        if (matchingSubEvt != null) {
          return matchingSubEvt;
        }
      }
    }
View Full Code Here


      // iterate over new events
      Iterator<ProcessTraceEvent> newEventIter = newEventList.iterator();
      while (newEventIter.hasNext()) {
        ProcessTraceEvent_impl newEvt = (ProcessTraceEvent_impl) newEventIter.next();
        // find corresponding event in thisEventList
        ProcessTraceEvent correspondingEvt = findCorrespondingEvent(mEventList, newEvt);
        if (correspondingEvt != null) {
          aggregateEvent((ProcessTraceEvent_impl) correspondingEvt, newEvt);
        } else {
          // no corresponding event - add newEvt to list of events to be added
          mEventList.add(newEvt);
View Full Code Here

    // iterate over src events
    Iterator<ProcessTraceEvent> srcEventIter = srcEventList.iterator();
    while (srcEventIter.hasNext()) {
      ProcessTraceEvent_impl srcEvt = (ProcessTraceEvent_impl) srcEventIter.next();
      // find corresponding event in destEventList
      ProcessTraceEvent correspondingEvt = findCorrespondingEvent(destEventList, srcEvt);
      if (correspondingEvt != null) {
        aggregateEvent((ProcessTraceEvent_impl) correspondingEvt, srcEvt);
      } else {
        // no corresponding event - add srcEvt to list of events to be added
        if (eventsToAdd == null) {
View Full Code Here

      // iterate over new events
      Iterator<ProcessTraceEvent> newEventIter = newEventList.iterator();
      while (newEventIter.hasNext()) {
        ProcessTraceEvent_impl newEvt = (ProcessTraceEvent_impl) newEventIter.next();
        // find corresponding event in thisEventList
        ProcessTraceEvent correspondingEvt = findCorrespondingEvent(mEventList, newEvt);
        if (correspondingEvt != null) {
          aggregateEvent((ProcessTraceEvent_impl) correspondingEvt, newEvt);
        } else {
          // no corresponding event - add newEvt to list of events to be added
          mEventList.add(newEvt);
View Full Code Here

    // iterate over src events
    Iterator<ProcessTraceEvent> srcEventIter = srcEventList.iterator();
    while (srcEventIter.hasNext()) {
      ProcessTraceEvent_impl srcEvt = (ProcessTraceEvent_impl) srcEventIter.next();
      // find corresponding event in destEventList
      ProcessTraceEvent correspondingEvt = findCorrespondingEvent(destEventList, srcEvt);
      if (correspondingEvt != null) {
        aggregateEvent((ProcessTraceEvent_impl) correspondingEvt, srcEvt);
      } else {
        // no corresponding event - add srcEvt to list of events to be added
        if (eventsToAdd == null) {
View Full Code Here

  }

  protected ProcessTraceEvent getEvent(List<ProcessTraceEvent> aEvents, String aComponentName, String aType) {
    Iterator<ProcessTraceEvent> it = aEvents.iterator();
    while (it.hasNext()) {
      ProcessTraceEvent event = (ProcessTraceEvent) it.next();
      if (aComponentName.equals(event.getComponentName()) && aType.equals(event.getType())) {
        return event;
      } else {
        ProcessTraceEvent matchingSubEvt = getEvent(event.getSubEvents(), aComponentName, aType);
        if (matchingSubEvt != null) {
          return matchingSubEvt;
        }
      }
    }
View Full Code Here

  private void copyComponentEvents(String aEvType, List aList, ProcessTrace aPTr)
          throws IOException {
    String typeS;

    for (int i = 0; i < aList.size(); i++) {
      ProcessTraceEvent prEvent = (ProcessTraceEvent) aList.get(i);
      typeS = prEvent.getType();
      if (aEvType != null && aEvType.equals(typeS)) {
        aPTr.addEvent(prEvent);
      }
    }
  }
View Full Code Here

        }
        if (logCas) {
          String ip = "no IP";
          List eList = aStatus.getProcessTrace().getEventsByComponentName("UimaEE", false);
          for (int e = 0; e < eList.size(); e++) {
            ProcessTraceEvent event = (ProcessTraceEvent) eList.get(e);
            if (event.getDescription().equals("Service IP")) {
              ip = event.getResultMessage();
            }
          }
          String casId = ((UimaASProcessStatus) aStatus).getCasReferenceId();
          if (casId != null) {
            long current = System.nanoTime() / 1000000 - mStartTime;
View Full Code Here

        if (parentCasReferenceId == null) {
          processCountLatch.countDown();
        }
        List eList = aProcessStatus.getProcessTrace().getEventsByComponentName("UimaEE", false);
        for (int i = 0; i < eList.size(); i++) {
          ProcessTraceEvent eEvent = (ProcessTraceEvent) eList.get(i);
          System.out.println("runTest: Received Process Event - " + eEvent.getDescription()
                  + " Duration::" + eEvent.getDuration() + " ms"); // / (float) 1000000);
          // Check if the running test wants to check how long the processing of CAS took
          if (expectedProcessTime > 0
                  && "Total Time In Process CAS".equals(eEvent.getDescription())) {
            // Check if the expected duration exceeded actual duration for processing
            // a CAS. Allow 50ms difference.
            if (eEvent.getDuration() > expectedProcessTime
                    && (eEvent.getDuration() % expectedProcessTime) > 50) {
              System.out.println("!!!!!!!!!!!!! runTest: Expected Process CAS Duration of:"
                      + expectedProcessTime + " ms. Instead Process CAS Took:"
                      + eEvent.getDuration());
              unexpectedException = true;
            }
          }

        }
View Full Code Here

     
      processCountLatch.countDown();
      List eList = aProcessStatus.getProcessTrace().getEventsByComponentName("UimaEE", false);
      for( int i=0; i < eList.size(); i++)
      {
        ProcessTraceEvent eEvent = (ProcessTraceEvent)eList.get(i);
        System.out.println("Received Process Event - "+eEvent.getDescription()+" Duration::"+eEvent.getDuration()+" ms"); // / (float) 1000000);
        //  Check if the running test wants to check how long the processing of CAS took
        if expectedProcessTime > 0 &&
            "Total Time In Process CAS".equals(eEvent.getDescription()))
        {
          //  Check if the expected duration exceeded actual duration for processing
          //  a CAS. Allow 50ms difference.
          if (eEvent.getDuration() > expectedProcessTime &&  (eEvent.getDuration() % expectedProcessTime ) > 50 )
          {
            System.out.println("!!!!!!!!!!!!! Expected Process CAS Duration of:"+expectedProcessTime+" ms. Instead Process CAS Took:"+eEvent.getDuration());
            unexpectedException = true;
          }
        }

      }
View Full Code Here

TOP

Related Classes of org.apache.uima.util.ProcessTraceEvent

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.