Package org.apache.uima.ducc.transport.event.jd

Examples of org.apache.uima.ducc.transport.event.jd.PerformanceMetricsSummaryItem


    duccOut.info(location, jobid, "PerformanceMetricsSummaryMapSize:"+map.size());
    duccOut.info(location, jobid, "uniqueName"+sep+"name"+sep+"numProcessed"+sep+"analysisTime"+sep+"Avg"+sep+"Min"+sep+"Max");
    Set<Entry<String, PerformanceMetricsSummaryItem>> tset = map.entrySet();
    for (Entry<String, PerformanceMetricsSummaryItem> entry : tset) {
      String uniqueName = entry.getKey();
      PerformanceMetricsSummaryItem value = entry.getValue();
      String name = value.getName();
      long analysisTime = value.getAnalysisTime();
      long numProcessed = value.getNumProcessed();
      long analysisTimeMin = value.getAnalysisTimeMin();
      long analysisTimeMax = value.getAnalysisTimeMax();
      double analysisTimeAvg = 0;
      if(numProcessed > 0) {
        analysisTimeAvg = analysisTime/numProcessed;
      }
      duccOut.info(location, jobid, uniqueName+sep+name+sep+numProcessed+sep+analysisTime+sep+analysisTimeAvg+sep+analysisTimeMin+sep+analysisTimeMax);
View Full Code Here


        int size = pms.size();
        Set<Entry<String, PerformanceMetricsSummaryItem>> set = pms.entrySet();
        ArrayList<PerformanceMetricsSummaryItem> items = new ArrayList<PerformanceMetricsSummaryItem>();
        int maxl = 0;
        for ( Entry<String, PerformanceMetricsSummaryItem> e : set ) {
            PerformanceMetricsSummaryItem pmi = e.getValue();
            String k = pmi.getUniqueName();
            maxl = Math.max(maxl, k.length());
            items.add(pmi);
        }

        Comparator<PerformanceMetricsSummaryItem> sorter = null;
        switch (summarySort) {
            case ItemsProcessed: sorter = new SummaryItemsProcessedSorter(); break;
            case MaxTime:        sorter = new SummaryMaxTimeSorter()break;
            case MinTime:        sorter = new SummaryMinTimeSorter()break;
            case Name:           sorter = new SummaryNameSorter();     break;
            case TotalTime:      sorter = new SummaryTimeSorter();     break;
        }

        Collections.sort(items, sorter);
        String fmt;
        if ( csv ) {
            fmt = "%d\t%d\t%d\t%d\t%s";
            System.out.println(""+size + "," + cascount);
        } else {
            System.out.println("Size: " + size + " CASCount: " + cascount);
            fmt = "%16s %16s %16s %16s %-" + maxl + "s";
            System.out.println(String.format(fmt, "Total Time", "Max Time", "Min Time", "Items Processed", "Name"));
            System.out.println(String.format(fmt, "----------", "--------", "--------", "---------------", dup("-", maxl)));
            fmt = "%16d %16d %16d %16d %-" + maxl + "s";
        }
       
        for ( int i = 0; i < items.size(); i++ ) {
            PerformanceMetricsSummaryItem pmi = items.get(i);           
            System.out.println(String.format(fmt, pmi.getAnalysisTime(), pmi.getAnalysisTimeMax(), pmi.getAnalysisTimeMin(), pmi.getNumProcessed(), pmi.getUniqueName()));
        }
    }
View Full Code Here

          sb.append("</tr>");
          ArrayList <UimaStatistic> uimaStats = new ArrayList<UimaStatistic>();
            uimaStats.clear();
            //long analysisTime = 0;
            for (Entry<String, PerformanceMetricsSummaryItem> entry : performanceMetricsSummaryMap.entrySet()) {
              PerformanceMetricsSummaryItem item = entry.getValue();
              String shortname = item.getDisplayName();
              long anTime = item.getAnalysisTime();
              long anMinTime = item.getAnalysisTimeMin();
              long anMaxTime = item.getAnalysisTimeMax();
              //analysisTime += anTime;
              UimaStatistic stat = new UimaStatistic(shortname, entry.getKey(), anTime, anMinTime, anMaxTime);
              uimaStats.add(stat);
            }
            Collections.sort(uimaStats);
View Full Code Here

TOP

Related Classes of org.apache.uima.ducc.transport.event.jd.PerformanceMetricsSummaryItem

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.