/** * Returns String representing all aggregated values. Just for debugging purposes. * * @return String containing all aggregated values */ public String dump() { return "MIN=" + Util.formatDouble(min) + ", MAX=" + Util.formatDouble(max) + "\n" + "FIRST=" + Util.formatDouble(first) + ", LAST=" + Util.formatDouble(last) + "\n" + "AVERAGE=" + Util.formatDouble(average) + ", TOTAL=" + Util.formatDouble(total); } }
/** * Returns string representing source definition (RRDTool format). * * @return String containing all data source definition parameters. */ public String dump() { return "DS:" + dsName + ":" + dsType + ":" + heartbeat + ":" + Util.formatDouble(minValue, "U", false) + ":" + Util.formatDouble(maxValue, "U", false); }
/** * Formats double as a string using exponential notation (RRDTool like). Used for debugging * through the project. * * @param x value to be formatted * @return string like "+1.234567E+02" */ public static String formatDouble(double x) { return formatDouble(x, true); }
/** * Returns string representing source definition (RRDTool format). * * @return String containing all data source definition parameters. */ public String dump() { return "DS:" + dsName + ":" + dsType + ":" + heartbeat + ":" + Util.formatDouble(minValue, "U", false) + ":" + Util.formatDouble(maxValue, "U", false); }
/** * Formats double as a string using exponential notation (RRDTool like). Used for debugging * throught the project. * * @param x value to be formatted * @return string like "+1.234567E+02" */ public static String formatDouble(double x) { return formatDouble(x, true); }
static String formatDouble(double x, boolean forceExponents) { return formatDouble(x, "" + Double.NaN, forceExponents); }
static String formatDouble(double x, boolean forceExponents) { return formatDouble(x, Double.toString(Double.NaN), forceExponents); }
/** * Writes <tag>value</tag> to output stream * * @param tag XML tag name * @param value value to be placed between <code><tag></code> and <code></tag></code> */ public void writeTag(String tag, double value, String nanString) { writeTag(tag, Util.formatDouble(value, nanString, true)); }
/** * Writes <tag>value</tag> to output stream * * @param tag XML tag name * @param value value to be placed between <code><tag></code> and <code></tag></code> * @param nanString a {@link java.lang.String} object. */ public void writeTag(String tag, double value, String nanString) { writeTag(tag, Util.formatDouble(value, nanString, true)); }
/** * Writes <tag>value</tag> to output stream * * @param tag XML tag name * @param value value to be placed between <code><tag></code> and <code></tag></code> */ public void writeTag(String tag, double value) { writeTag(tag, Util.formatDouble(value, true)); }
/** * Writes <tag>value</tag> to output stream * * @param tag XML tag name * @param value value to be placed between <code><tag></code> and <code></tag></code> */ public void writeTag(String tag, double value) { writeTag(tag, Util.formatDouble(value, true)); }
public String dump() throws IOException { StringBuilder buffer = new StringBuilder("Robin " + pointer.get() + "/" + rows + ": "); double[] values = getValues(); for (double value : values) { buffer.append(Util.formatDouble(value, true)).append(" "); } buffer.append("\n"); return buffer.toString(); }
public String dump() throws IOException { StringBuilder buffer = new StringBuilder("Robin " + pointer.get() + "/" + rows + ": "); double[] values = getValues(); for (double value : values) { buffer.append(Util.formatDouble(value, true)).append(" "); } buffer.append("\n"); return buffer.toString(); }
/** * Dumps the content of the whole FetchData object. Useful for debugging. */ public String dump() { StringBuilder buffer = new StringBuilder(); for (int row = 0; row < getRowCount(); row++) { buffer.append(timestamps[row]); buffer.append(": "); for (int dsIndex = 0; dsIndex < getColumnCount(); dsIndex++) { buffer.append(Util.formatDouble(values[dsIndex][row], true)); buffer.append(" "); } buffer.append("\n"); } return buffer.toString(); }
/** * Dumps sample content using the syntax of RRDTool's update command. * * @return Sample dump. */ public String dump() { StringBuilder buffer = new StringBuilder("update \""); buffer.append(parentDb.getRrdBackend().getPath()).append("\" ").append(time); for (double value : values) { buffer.append(':'); buffer.append(Util.formatDouble(value, "U", false)); } return buffer.toString(); }
/** * Dumps sample content using the syntax of RRDTool's update command. * * @return Sample dump. */ public String dump() { StringBuilder buffer = new StringBuilder("update \""); buffer.append(parentDb.getRrdBackend().getPath()).append("\" ").append(time); for (double value : values) { buffer.append(':'); buffer.append(Util.formatDouble(value, "U", false)); } return buffer.toString(); }
/** * <p>dump.</p> * * @return a {@link java.lang.String} object. * @throws java.io.IOException if any. */ public String dump() throws IOException { StringBuilder buffer = new StringBuilder("Robin " + pointer.get() + "/" + rows + ": "); double[] values = getValues(); for (double value : values) { buffer.append(Util.formatDouble(value, true)).append(" "); } buffer.append("\n"); return buffer.toString(); }
/** * <p>dump.</p> * * @return a {@link java.lang.String} object. * @throws java.io.IOException if any. */ public String dump() throws IOException { StringBuilder buffer = new StringBuilder("Robin " + pointer.get() + "/" + rows + ": "); double[] values = getValues(); for (double value : values) { buffer.append(Util.formatDouble(value, true)).append(" "); } buffer.append("\n"); return buffer.toString(); }
/** * Dumps the content of the whole FetchData object. Useful for debugging. * * @return a {@link java.lang.String} containing the contents of this object, for debugging. */ public String dump() { StringBuilder buffer = new StringBuilder(); for (int row = 0; row < getRowCount(); row++) { buffer.append(timestamps[row]); buffer.append(": "); for (int dsIndex = 0; dsIndex < getColumnCount(); dsIndex++) { buffer.append(Util.formatDouble(values[dsIndex][row], true)); buffer.append(" "); } buffer.append("\n"); } return buffer.toString(); }
/** * Returns String representing all aggregated values. Just for debugging purposes. * * @return String containing all aggregated values */ public String dump() { StringBuilder bl = new StringBuilder(); for(ConsolFun cf: ConsolFun.values()) { bl.append(cf.name() + '=' + Util.formatDouble(this.getAggregate(cf))); } return bl.toString(); } }