public long childTime() { long t = 0; for (Invocation inv : children.values()) { t += inv.getDuration(); } return t; }
public long childTime() { long t = 0; for (Invocation inv : children.values()) { t += inv.getDuration(); } return t; }
public long childTime() { long t = 0; for (Invocation inv : children.values()) { t += inv.getDuration(); } return t; }
public long childTime() { long t = 0; for (Invocation inv : children.values()) { t += inv.getDuration(); } return t; }
public void printProfile(PrintStream out, boolean first) { Invocation topInvocation = getTopInvocation(); IntHashMap<MethodData> methods = methodData(topInvocation); String threadName = getThreadName(); if (!first) { out.println(","); } out.println("\t\t{"); out.printf("\t\t\t\"total_time\":%s,\n", nanosToSecondsString(topInvocation.getDuration())); out.printf("\t\t\t\"thread_name\":\"%s\",\n", threadName); out.println("\t\t\t\"methods\":["); Iterator<MethodData> i = methods.values().iterator(); while (i.hasNext()) { MethodData method = i.next(); out.print("\t\t\t\t"); out.print(methodToJson(method)); if (i.hasNext()) { out.print(","); } out.println(); } out.print("\t\t\t]\n\t\t}"); }
public void printProfile(PrintStream out, boolean first) { Invocation topInvocation = getTopInvocation(); IntHashMap<MethodData> methods = methodData(topInvocation); String threadName = getThreadName(); if (!first) { out.println(","); } out.println("\t\t{"); out.printf("\t\t\t\"total_time\":%s,\n", nanosToSecondsString(topInvocation.getDuration())); out.printf("\t\t\t\"thread_name\":\"%s\",\n", threadName); out.println("\t\t\t\"methods\":["); Iterator<MethodData> i = methods.values().iterator(); while (i.hasNext()) { MethodData method = i.next(); out.print("\t\t\t\t"); out.print(methodToJson(method)); if (i.hasNext()) { out.print(","); } out.println(); } out.print("\t\t\t]\n\t\t}"); }
public void printProfile(PrintStream out, boolean first) { Invocation topInvocation = getTopInvocation(); IntHashMap<MethodData> methods = methodData(topInvocation); String threadName = getThreadName(); if (!first) { out.println(","); } out.println("\t\t{"); out.printf("\t\t\t\"total_time\":%s,\n", nanosToSecondsString(topInvocation.getDuration())); out.printf("\t\t\t\"thread_name\":\"%s\",\n", threadName); out.println("\t\t\t\"methods\":["); Iterator<MethodData> i = methods.values().iterator(); while (i.hasNext()) { MethodData method = i.next(); out.print("\t\t\t\t"); out.print(methodToJson(method)); if (i.hasNext()) { out.print(","); } out.println(); } out.print("\t\t\t]\n\t\t}"); }
public void printProfile(PrintStream out, boolean first) { Invocation topInvocation = getTopInvocation(); IntHashMap<MethodData> methods = methodData(topInvocation); String threadName = getThreadName(); if (!first) { out.println(","); } out.println("\t\t{"); out.printf("\t\t\t\"total_time\":%s,\n", nanosToSecondsString(topInvocation.getDuration())); out.printf("\t\t\t\"thread_name\":\"%s\",\n", threadName); out.println("\t\t\t\"methods\":["); Iterator<MethodData> i = methods.values().iterator(); while (i.hasNext()) { MethodData method = i.next(); out.print("\t\t\t\t"); out.print(methodToJson(method)); if (i.hasNext()) { out.print(","); } out.println(); } out.print("\t\t\t]\n\t\t}"); }
Invocation copyWithNewSerialAndParent(int serial, Invocation newParent) { Invocation newInv = new Invocation(newParent, serial, children); newInv.setDuration(duration); newInv.setCount(count); newInv.setRecursiveDepth(recursiveDepth); for (Invocation child : children.values()) { child.setParent(newInv); } return newInv; }
Invocation copyWithNewSerialAndParent(int serial, Invocation newParent) { Invocation newInv = new Invocation(newParent, serial, children); newInv.setDuration(duration); newInv.setCount(count); newInv.setRecursiveDepth(recursiveDepth); for (Invocation child : children.values()) { child.setParent(newInv); } return newInv; }
Invocation copyWithNewSerialAndParent(int serial, Invocation newParent) { Invocation newInv = new Invocation(newParent, serial, children); newInv.setDuration(duration); newInv.setCount(count); newInv.setRecursiveDepth(recursiveDepth); for (Invocation child : children.values()) { child.setParent(newInv); } return newInv; }
Invocation copyWithNewSerialAndParent(int serial, Invocation newParent) { Invocation newInv = new Invocation(newParent, serial, children); newInv.setDuration(duration); newInv.setCount(count); newInv.setRecursiveDepth(recursiveDepth); for (Invocation child : children.values()) { child.setParent(newInv); } return newInv; }
private void setRecursiveDepths1(Invocation inv) { int depth; int childSerial; for (Invocation child : inv.getChildren().values()) { childSerial = child.getMethodSerialNumber(); depth = incRecursionFor(childSerial); child.setRecursiveDepth(depth); setRecursiveDepths1(child); decRecursionFor(childSerial); } }
/** * Compute the profiling results from gathered data. * @return the top invocation */ public Invocation computeResults() { setRecursiveDepths(); if (topInvocation.getChildren().size() != 1) { return setDuration(topInvocation); } if (topInvocation.getChildren().size() == 1) { Invocation singleTopChild = topInvocation.getChildren().values().iterator().next(); int serial = singleTopChild.getMethodSerialNumber(); if ( ProfilePrinter.PROFILER_PROFILE_METHOD.equals( methodName(serial) ) ) { for ( Invocation inv : singleTopChild.getChildren().values() ) { serial = inv.getMethodSerialNumber(); if ( ProfilePrinter.PROFILER_PROFILED_CODE_METHOD.equals( methodName(serial) ) ) { return setDuration(inv.copyWithNewSerialAndParent(0, null)); } } } } return setDuration(topInvocation); }
private void setRecursiveDepths1(Invocation inv) { int depth; int childSerial; for (Invocation child : inv.getChildren().values()) { childSerial = child.getMethodSerialNumber(); depth = incRecursionFor(childSerial); child.setRecursiveDepth(depth); setRecursiveDepths1(child); decRecursionFor(childSerial); } }
/** * Compute the profiling results from gathered data. * @return the top invocation */ public Invocation computeResults() { setRecursiveDepths(); if (topInvocation.getChildren().size() != 1) { return setDuration(topInvocation); } if (topInvocation.getChildren().size() == 1) { Invocation singleTopChild = topInvocation.getChildren().values().iterator().next(); int serial = singleTopChild.getMethodSerialNumber(); if ( ProfilePrinter.PROFILER_PROFILE_METHOD.equals( methodName(serial) ) ) { for ( Invocation inv : singleTopChild.getChildren().values() ) { serial = inv.getMethodSerialNumber(); if ( ProfilePrinter.PROFILER_PROFILED_CODE_METHOD.equals( methodName(serial) ) ) { return setDuration(inv.copyWithNewSerialAndParent(0, null)); } } } } return setDuration(topInvocation); }
/** * Compute the profiling results from gathered data. * @return the top invocation */ public Invocation computeResults() { setRecursiveDepths(); if (topInvocation.getChildren().size() != 1) { return setDuration(topInvocation); } if (topInvocation.getChildren().size() == 1) { Invocation singleTopChild = topInvocation.getChildren().values().iterator().next(); int serial = singleTopChild.getMethodSerialNumber(); if ( PROFILER_PROFILE_METHOD.equals( methodName(serial) ) ) { for ( Invocation inv : singleTopChild.getChildren().values() ) { serial = inv.getMethodSerialNumber(); if ( PROFILER_PROFILED_CODE_METHOD.equals( methodName(serial) ) ) { return setDuration(inv.copyWithNewSerialAndParent(0, null)); } } } } return setDuration(topInvocation); }
private void setRecursiveDepths1(Invocation inv) { int depth; int childSerial; for (Invocation child : inv.getChildren().values()) { childSerial = child.getMethodSerialNumber(); depth = incRecursionFor(childSerial); child.setRecursiveDepth(depth); setRecursiveDepths1(child); decRecursionFor(childSerial); } }
/** * Compute the profiling results from gathered data. * @return the top invocation */ public Invocation computeResults() { setRecursiveDepths(); if (topInvocation.getChildren().size() != 1) { return setDuration(topInvocation); } if (topInvocation.getChildren().size() == 1) { Invocation singleTopChild = topInvocation.getChildren().values().iterator().next(); int serial = singleTopChild.getMethodSerialNumber(); if ( PROFILER_PROFILE_METHOD.equals( methodName(serial) ) ) { for ( Invocation inv : singleTopChild.getChildren().values() ) { serial = inv.getMethodSerialNumber(); if ( PROFILER_PROFILED_CODE_METHOD.equals( methodName(serial) ) ) { return setDuration(inv.copyWithNewSerialAndParent(0, null)); } } } } return setDuration(topInvocation); }
private void setRecursiveDepths1(Invocation inv) { int depth; int childSerial; for (Invocation child : inv.getChildren().values()) { childSerial = child.getMethodSerialNumber(); depth = incRecursionFor(childSerial); child.setRecursiveDepth(depth); setRecursiveDepths1(child); decRecursionFor(childSerial); } }