public String toString(boolean asciiArt, AsciiCallTreeSignatureFormatter callTreeAsciiFormatter) { final StringBuilder sb = new StringBuilder(3000); sb.append("----------------------------------------------------------------------\n"); sb.append("Selftime (ms) Total (ms) Method signature\n"); sb.append("----------------------------------------------------------------------\n"); logStats(getExecutionTime(), new LinkedList<String>(), sb, asciiArt, callTreeAsciiFormatter); return sb.toString(); }
private void appendTimesPercentTable(long totalExecutionTimeNs, StringBuilder sb, boolean asciiArt) { appendNumber(sb, getNetExecutionTime()); appendPercent(sb, getNetExecutionTime(), totalExecutionTimeNs, asciiArt); appendNumber(sb, getExecutionTime()); appendPercent(sb, getExecutionTime(), totalExecutionTimeNs, asciiArt); }
private void addCallTreeToSpan(SpanContextInformation info, Span span, String operationName) { final CallStackElement callTree = info.getCallTree(); callTree.setSignature(operationName); final double minExecutionTimeMultiplier = tracingPlugin.getMinExecutionTimePercent() / 100; if (minExecutionTimeMultiplier > 0d) { callTree.removeCallsFasterThan((long) (callTree.getExecutionTime() * minExecutionTimeMultiplier)); } if (!tracingPlugin.getExcludedTags().contains(SpanUtils.CALL_TREE_JSON)) { span.setTag(SpanUtils.CALL_TREE_JSON, JsonUtils.toJson(callTree)); } if (!tracingPlugin.getExcludedTags().contains(SpanUtils.CALL_TREE_ASCII)) { span.setTag(SpanUtils.CALL_TREE_ASCII, callTree.toString(true, tracingPlugin.getCallTreeAsciiFormatter())); } } }