/** * Returns a String description of an Accountable and any nested resources. * This is intended for development and debugging. */ public static String toString(Accountable a) { StringBuilder sb = new StringBuilder(); toString(sb, a, 0); return sb.toString(); }
private static StringBuilder toString(StringBuilder dest, Accountable a, int depth) { for (int i = 1; i < depth; i++) { dest.append(" "); } if (depth > 0) { dest.append("|-- "); } dest.append(a.toString()); dest.append(": "); dest.append(RamUsageEstimator.humanReadableUnits(a.ramBytesUsed())); dest.append(System.lineSeparator()); for (Accountable child : a.getChildResources()) { toString(dest, child, depth + 1); } return dest; }
msg(infoStream, Accountables.toString(reader));
/** * Returns a String description of an Accountable and any nested resources. * This is intended for development and debugging. */ public static String toString(Accountable a) { StringBuilder sb = new StringBuilder(); toString(sb, a, 0); return sb.toString(); }
/** * Returns a String description of an Accountable and any nested resources. * This is intended for development and debugging. */ public static String toString(Accountable a) { StringBuilder sb = new StringBuilder(); toString(sb, a, 0); return sb.toString(); }
/** * Returns a String description of an Accountable and any nested resources. * This is intended for development and debugging. */ public static String toString(Accountable a) { StringBuilder sb = new StringBuilder(); toString(sb, a, 0); return sb.toString(); }
private static StringBuilder toString(StringBuilder dest, Accountable a, int depth) { for (int i = 1; i < depth; i++) { dest.append(" "); } if (depth > 0) { dest.append("|-- "); } dest.append(a.toString()); dest.append(": "); dest.append(RamUsageEstimator.humanReadableUnits(a.ramBytesUsed())); dest.append(System.lineSeparator()); for (Accountable child : a.getChildResources()) { toString(dest, child, depth + 1); } return dest; }
private static StringBuilder toString(StringBuilder dest, Accountable a, int depth) { for (int i = 1; i < depth; i++) { dest.append(" "); } if (depth > 0) { dest.append("|-- "); } dest.append(a.toString()); dest.append(": "); dest.append(RamUsageEstimator.humanReadableUnits(a.ramBytesUsed())); dest.append(System.lineSeparator()); for (Accountable child : a.getChildResources()) { toString(dest, child, depth + 1); } return dest; }
private static StringBuilder toString(StringBuilder dest, Accountable a, int depth) { for (int i = 1; i < depth; i++) { dest.append(" "); } if (depth > 0) { dest.append("|-- "); } dest.append(a.toString()); dest.append(": "); dest.append(RamUsageEstimator.humanReadableUnits(a.ramBytesUsed())); dest.append(System.lineSeparator()); for (Accountable child : a.getChildResources()) { toString(dest, child, depth + 1); } return dest; }
msg(infoStream, Accountables.toString(reader));
msg(infoStream, Accountables.toString(reader));
msg(infoStream, Accountables.toString(reader));