LSS performance measurement code

The following code was timed for various values of mappedValueSize to measure the ingestion rate of the CEDA LSS.


const int NUM_TXN = 1000;
const int NUM_ROWS_PER_TXN = 1000;
int numRecords = NUM_TXN * NUM_ROWS_PER_TXN;
const char* path = "test.lss";
bool createdNew;
LssSettings settings;
settings.maxNumSegmentsInCache = 128;
settings.numSegmentsPerCheckPoint = 512;
settings.segmentSize = 4*1024*1024;
ILogStructuredStore* lss = CreateOrOpenLSS(path, nullptr, createdNew, OM_OPEN_ALWAYS, settings);
SeidHigh seidHigh = lss->CreateSeidSpace();
std::vector<octet_t> buffer(mappedValueSize);
for (int i=0 ; i < NUM_TXN ; ++i)
{
    ILssTransaction* txn = lss->OpenTransaction();
    for (int j=0 ; j < NUM_ROWS_PER_TXN ; ++j)
    {
        Seid seid = lss->AllocateSeid(seidHigh);
        ICloseableOutputStream* os = txn->WriteSerialElement(seid);
        os->WriteStream(buffer.data(), buffer.size());
        os->Close();
    }
    txn->Close();
}
lss->Close();