Search in sources :

Example 1 with MockMeasurement

use of com.srotya.sidewinder.core.storage.MockMeasurement in project sidewinder by srotya.

the class TestDownSamplingIFunction method before.

@Before
public void before() throws IOException {
    measurement = new MockMeasurement(32768, 100);
    TimeField.compressionClass = CompressionFactory.getTimeClassByName("byzantine");
}
Also used : MockMeasurement(com.srotya.sidewinder.core.storage.MockMeasurement) Before(org.junit.Before)

Example 2 with MockMeasurement

use of com.srotya.sidewinder.core.storage.MockMeasurement in project sidewinder by srotya.

the class TestBasicSingleFunctions method before.

@Before
public void before() throws IOException {
    measurement = new MockMeasurement(32768, 100);
    TimeField.compressionClass = CompressionFactory.getTimeClassByName("byzantine");
    Field tField = new TimeField(measurement, new LinkedByteString().concat(new ByteString("time")), 121213, new HashMap<>());
    long ts = 1546755991280L;
    for (int i = 0; i < 200; i++) {
        tField.addDataPoint(measurement, ts + i * 1000);
    }
    Field vField = new ValueField(measurement, new LinkedByteString().concat(new ByteString("field1")), 121213, new HashMap<>());
    for (int i = 0; i < 100; i++) {
        vField.addDataPoint(measurement, i * 1L);
    }
    for (int i = 100; i > 0; i--) {
        vField.addDataPoint(measurement, i * 1L);
    }
    itr = new DataPointIterator(tField.queryReader(null, new NoLock()), vField.queryReader(null, new NoLock()));
}
Also used : Field(com.srotya.sidewinder.core.storage.Field) ValueField(com.srotya.sidewinder.core.storage.ValueField) TimeField(com.srotya.sidewinder.core.storage.TimeField) TimeField(com.srotya.sidewinder.core.storage.TimeField) DataPointIterator(com.srotya.sidewinder.core.storage.DataPointIterator) MockMeasurement(com.srotya.sidewinder.core.storage.MockMeasurement) LinkedByteString(com.srotya.sidewinder.core.storage.LinkedByteString) ByteString(com.srotya.sidewinder.core.storage.ByteString) NoLock(com.srotya.sidewinder.core.storage.NoLock) LinkedByteString(com.srotya.sidewinder.core.storage.LinkedByteString) DataPoint(com.srotya.sidewinder.core.storage.DataPoint) ValueField(com.srotya.sidewinder.core.storage.ValueField) Before(org.junit.Before)

Example 3 with MockMeasurement

use of com.srotya.sidewinder.core.storage.MockMeasurement in project sidewinder by srotya.

the class TestTumblingWindowFunction method before.

@Before
public void before() throws IOException {
    measurement = new MockMeasurement(32768, 100);
    TimeField.compressionClass = CompressionFactory.getTimeClassByName("byzantine");
}
Also used : MockMeasurement(com.srotya.sidewinder.core.storage.MockMeasurement) Before(org.junit.Before)

Aggregations

MockMeasurement (com.srotya.sidewinder.core.storage.MockMeasurement)3 Before (org.junit.Before)3 ByteString (com.srotya.sidewinder.core.storage.ByteString)1 DataPoint (com.srotya.sidewinder.core.storage.DataPoint)1 DataPointIterator (com.srotya.sidewinder.core.storage.DataPointIterator)1 Field (com.srotya.sidewinder.core.storage.Field)1 LinkedByteString (com.srotya.sidewinder.core.storage.LinkedByteString)1 NoLock (com.srotya.sidewinder.core.storage.NoLock)1 TimeField (com.srotya.sidewinder.core.storage.TimeField)1 ValueField (com.srotya.sidewinder.core.storage.ValueField)1