static Dictionary <byte[], byte[]> LoadSampleData() { using (var btdb = new BtdbTimeTests(false, true)) { return(btdb.GetDbData("sampleData")); } }
public void Run() { // _testData = ShuffleData(LoadSampleData()); _testData = CreateRandomData(99999); const bool inMemory = false; const bool memoryMapped = true; var randomKeyValuePair = CreateRandomKeyValuePair(); Console.WriteLine($"--------------- BTDB inMemory: {inMemory}, memoryMapped: {memoryMapped} -------------"); using (var db = new BtdbTimeTests(inMemory, memoryMapped)) { // HugeTest(db); // InsertDataByItemTest(db); InsertDataTest(db); ReadAllDataTest(db); InsertItemTest(db, randomKeyValuePair.key, randomKeyValuePair.value); ReadItemTest(db, _testData.ToArray()[9999].Key); } Console.WriteLine("--------------- LMDB -------------"); using (var db = new LightingDbTimeTests()) { // HugeTest(db); // InsertDataByItemTest(db); InsertDataTest(db); ReadAllDataTest(db); InsertItemTest(db, randomKeyValuePair.key, randomKeyValuePair.value); ReadItemTest(db, _testData.ToArray()[9999].Key); } }