for (int i=0; i < stats.length; i++) { long v; switch(stats[i].getTypeCode()) { case BOOLEAN_CODE: v = dataIn.readByte(); break; default: throw new IOException(LocalizedStrings.StatArchiveReader_UNEXPECTED_TYPECODE_VALUE_0.toLocalizedString(Byte.valueOf(stats[i].getTypeCode())));
for (int i=0; i < stats.length; i++) { long v; switch(stats[i].getTypeCode()) { case BOOLEAN_CODE: v = dataIn.readByte(); break; default: throw new IOException(LocalizedStrings.StatArchiveReader_UNEXPECTED_TYPECODE_VALUE_0.toLocalizedString(Byte.valueOf(stats[i].getTypeCode())));
while (statOffset != ILLEGAL_STAT_OFFSET) { long statDeltaBits; switch(stats[statOffset].getTypeCode()) { case BOOLEAN_CODE: statDeltaBits = dataIn.readByte(); break; default: throw new IOException(LocalizedStrings.StatArchiveReader_UNEXPECTED_TYPECODE_VALUE_0.toLocalizedString(Byte.valueOf(stats[statOffset].getTypeCode())));
while (statOffset != ILLEGAL_STAT_OFFSET) { long statDeltaBits; switch(stats[statOffset].getTypeCode()) { case BOOLEAN_CODE: statDeltaBits = dataIn.readByte(); break; default: throw new IOException(LocalizedStrings.StatArchiveReader_UNEXPECTED_TYPECODE_VALUE_0.toLocalizedString(Byte.valueOf(stats[statOffset].getTypeCode())));
public double[] getSnapshots() { double[] result; int startIdx = getStartIdx(); int endIdx = getEndIdx(startIdx); int resultSize=(endIdx-startIdx) + 1; if (filter != FILTER_NONE && resultSize > 1) { long[] timestamps = null; if (filter == FILTER_PERSEC) { timestamps = resource.getAllRawTimeStamps(); } result = new double[resultSize-1]; int tsIdx = resource.getFirstTimeStampIdx()+startIdx; double[] values = series.getValuesEx(descriptor.getTypeCode(), startIdx, resultSize); for (int i=0; i < result.length; i++) { double valueDelta = values[i+1] - values[i]; if (filter == FILTER_PERSEC) { double timeDelta = (timestamps[tsIdx+i+1] - timestamps[tsIdx+i]); // millis valueDelta /= (timeDelta / 1000); // per second } result[i] = valueDelta; } } else { result = series.getValuesEx(descriptor.getTypeCode(), startIdx, resultSize); } calcStats(result); return result; }
public double[] getSnapshots() { double[] result; int startIdx = getStartIdx(); int endIdx = getEndIdx(startIdx); int resultSize=(endIdx-startIdx) + 1; if (filter != FILTER_NONE && resultSize > 1) { long[] timestamps = null; if (filter == FILTER_PERSEC) { timestamps = resource.getAllRawTimeStamps(); } result = new double[resultSize-1]; int tsIdx = resource.getFirstTimeStampIdx()+startIdx; double[] values = series.getValuesEx(descriptor.getTypeCode(), startIdx, resultSize); for (int i=0; i < result.length; i++) { double valueDelta = values[i+1] - values[i]; if (filter == FILTER_PERSEC) { double timeDelta = (timestamps[tsIdx+i+1] - timestamps[tsIdx+i]); // millis valueDelta /= (timeDelta / 1000); // per second } result[i] = valueDelta; } } else { result = series.getValuesEx(descriptor.getTypeCode(), startIdx, resultSize); } calcStats(result); return result; }
public double[] getRawSnapshots() { int startIdx = getStartIdx(); int endIdx = getEndIdx(startIdx); int resultSize=(endIdx-startIdx) + 1; return series.getValuesEx(descriptor.getTypeCode(), startIdx, resultSize); }
public double[] getRawSnapshots() { int startIdx = getStartIdx(); int endIdx = getEndIdx(startIdx); int resultSize=(endIdx-startIdx) + 1; return series.getValuesEx(descriptor.getTypeCode(), startIdx, resultSize); }