@OperationsPerInvocation(100000) public void encodingBenchmark(DataGenerator dg) { ByteBufferBitOutput output = new ByteBufferBitOutput(); Compressor c = new Compressor(dg.blockStart, output); for(int j = 0; j < dg.amountOfPoints; j++) { c.addValue(dg.uncompressedBuffer.getLong(), dg.uncompressedBuffer.getDouble()); } c.close(); dg.uncompressedBuffer.rewind(); }
@OperationsPerInvocation(100000) public void encodingBenchmark(DataGenerator dg) { ByteBufferBitOutput output = new ByteBufferBitOutput(); Compressor c = new Compressor(dg.blockStart, output); for(int j = 0; j < dg.amountOfPoints; j++) { c.addValue(dg.uncompressedBuffer.getLong(), dg.uncompressedBuffer.getDouble()); } c.close(); dg.uncompressedBuffer.rewind(); }
c.addValue(bb.getLong(), bb.getDouble()); gc.addValue(uncompressedTimestamps[j], uncompressedDoubles[j]);
c.addValue(bb.getLong(), bb.getDouble()); gc.addValue(uncompressedTimestamps[j], uncompressedDoubles[j]);
switch(r.getByte(1)) { case 0: // GAUGE compressor.addValue(timestamp, r.getDouble(4)); break; case 1: // AVAILABILITY compressor.addValue(timestamp, ((Byte) (AvailabilityType.fromBytes(r.getBytes(5)) .getCode())).doubleValue()); break; case 2: // COUNTER compressor.addValue(timestamp, ((Long) r.getLong(6)).doubleValue()); break; default:
switch(r.getByte(1)) { case 0: // GAUGE compressor.addValue(timestamp, r.getDouble(4)); break; case 1: // AVAILABILITY compressor.addValue(timestamp, ((Byte) (AvailabilityType.fromBytes(r.getBytes(5)) .getCode())).doubleValue()); break; case 2: // COUNTER compressor.addValue(timestamp, ((Long) r.getLong(6)).doubleValue()); break; default:
switch(metricType.getCode()) { case 0: // GAUGE compressor.addValue(d.getTimestamp(), (Double) d.getValue()); break; case 1: // AVAILABILITY compressor.addValue(d.getTimestamp(), ((Byte) ((AvailabilityType) d.getValue()).getCode()) .doubleValue()); break; case 2: // COUNTER compressor.addValue(d.getTimestamp(), ((Long) d.getValue()).doubleValue()); break; default:
switch(metricType.getCode()) { case 0: // GAUGE compressor.addValue(d.getTimestamp(), (Double) d.getValue()); break; case 1: // AVAILABILITY compressor.addValue(d.getTimestamp(), ((Byte) ((AvailabilityType) d.getValue()).getCode()) .doubleValue()); break; case 2: // COUNTER compressor.addValue(d.getTimestamp(), ((Long) d.getValue()).doubleValue()); break; default: