예제 #1
0
 private void addStep(TraceStep step, AnalyzedProducerCallsMapAO... maps) {
   String producerName =
       step.getProducer() == null ? "UNKNOWN" : step.getProducer().getProducerId();
   for (AnalyzedProducerCallsMapAO map : maps) {
     map.addProducerCall(producerName, step.getNetDuration());
   }
   for (TraceStep childStep : step.getChildren()) {
     addStep(childStep, maps);
   }
 }
예제 #2
0
  private void fillUseCasePathElementBeanList(
      JourneyCallIntermediateContainer container, TraceStep element, int recursion, TimeUnit unit) {
    TracedCallStepAO b = new TracedCallStepAO();
    b.setCall(recursion == 0 ? "ROOT" : element.getCall());
    b.setRoot(recursion == 0);
    b.setLayer(recursion);
    b.setDuration(unit.transformNanos(element.getDuration()));
    b.setLevel(recursion);
    StringBuilder ident = new StringBuilder();
    for (int i = 0; i < recursion; i++) ident.append("&nbsp;&nbsp;");
    b.setIdent(ident.toString());
    b.setAborted(element.isAborted());
    container.add(b);

    long timeSpentInChildren = 0;
    for (TraceStep p : element.getChildren()) {

      timeSpentInChildren += p.getDuration();
      fillUseCasePathElementBeanList(container, p, recursion + 1, unit);
    }
    b.setTimespent(unit.transformNanos((element.getDuration() - timeSpentInChildren)));
  }