public String dump() { return("== DATASOURCE ==\n" + "DS:" + dsName.get() + ":" + dsType.Name + ":" + heartbeat.get() + ":" + minValue.get() + ":" + maxValue.get() + "\nlastValue:" + lastValue.get() + " nanSeconds:" + nanSeconds.get() + " accumValue:" + accumValue.get() + "\n"); }
public Datasource(RrdDb parentDb, DsDef dsDef) { bool shouldInitialize = dsDef != null; this.parentDb = parentDb; dsName = new RrdString(this); dsTypeName = new RrdString(this); if (!shouldInitialize) dsType = new DsType(dsTypeName.get()); heartbeat = new RrdLong(this); minValue = new RrdDouble(this); maxValue = new RrdDouble(this); lastValue = new RrdDouble(this); accumValue = new RrdDouble(this); nanSeconds = new RrdLong(this); if (shouldInitialize) { dsName.set(dsDef.getDsName()); dsType = dsDef.getDsType(); dsTypeName.set(dsType.Name); heartbeat.set(dsDef.getHeartbeat()); minValue.set(dsDef.getMinValue()); maxValue.set(dsDef.getMaxValue()); lastValue.set(Double.NaN); accumValue.set(0.0); Header header = parentDb.getHeader(); nanSeconds.set(header.getLastUpdateTime() % header.getStep()); } }
public Datasource(RrdDb parentDb, DsDef dsDef) { bool shouldInitialize = dsDef != null; this.parentDb = parentDb; dsName = new RrdString(this); dsTypeName = new RrdString(this); if (!shouldInitialize) { dsType = new DsType(dsTypeName.get()); } heartbeat = new RrdLong(this); minValue = new RrdDouble(this); maxValue = new RrdDouble(this); lastValue = new RrdDouble(this); accumValue = new RrdDouble(this); nanSeconds = new RrdLong(this); if (shouldInitialize) { dsName.set(dsDef.getDsName()); dsType = dsDef.getDsType(); dsTypeName.set(dsType.Name); heartbeat.set(dsDef.getHeartbeat()); minValue.set(dsDef.getMinValue()); maxValue.set(dsDef.getMaxValue()); lastValue.set(Double.NaN); accumValue.set(0.0); Header header = parentDb.getHeader(); nanSeconds.set(header.getLastUpdateTime() % header.getStep()); } }
public String dump() { StringBuilder buffer = new StringBuilder("== ARCHIVE ==\n"); buffer.Append("RRA:").Append(consolFun.get()).Append(":").Append(xff.get()).Append(":").Append(steps.get()).Append(":").Append(rows.get()).Append("\n"); buffer.Append("interval [").Append(getStartTime()).AppendFormat(" ({0}) ", getStartDateTime().ToString()) .Append(", ").Append(getEndTime()).AppendFormat(" ({0}) ", getEndDateTime().ToString()).Append("]" + "\n"); for (int i = 0; i < robins.Length; i++) { buffer.Append(states[i].dump()); buffer.Append(robins[i].dump()); } return(buffer.ToString()); }
/** * Returns RRD signature. Initially, the returned string will be * of the form <b><i>Rrd4n, version x.x</i></b>. Note: RRD format did not * change since Rrd4n 1.0.0 release (and probably never will). * * @return RRD signature * @Thrown in case of I/O error */ public String getSignature() { return(signature.get()); }