mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Change NodeStore::Backend tests to reflect observed patterns:
Empirical evidence shows a database access pattern with few hits and many misses (objects that don't exist). This changes the timing tests so they more accurately reflect rippled's actual usage: * Add read missing keys test * Increase numObjectsToTest to 1,000,000 * Alter PredictableObjectFactory to seed RNG once only * Make NodeStoreTiming a manual test
This commit is contained in:
committed by
Vinnie Falco
parent
5b7f172d03
commit
44c68d6174
@@ -31,15 +31,15 @@ public:
|
||||
testcase ("batch");
|
||||
|
||||
Batch batch1;
|
||||
createPredictableBatch (batch1, 0, numObjectsToTest, seedValue);
|
||||
createPredictableBatch (batch1, numObjectsToTest, seedValue);
|
||||
|
||||
Batch batch2;
|
||||
createPredictableBatch (batch2, 0, numObjectsToTest, seedValue);
|
||||
createPredictableBatch (batch2, numObjectsToTest, seedValue);
|
||||
|
||||
expect (areBatchesEqual (batch1, batch2), "Should be equal");
|
||||
|
||||
Batch batch3;
|
||||
createPredictableBatch (batch3, 1, numObjectsToTest, seedValue);
|
||||
createPredictableBatch (batch3, numObjectsToTest, seedValue+1);
|
||||
|
||||
expect (! areBatchesEqual (batch1, batch3), "Should not be equal");
|
||||
}
|
||||
@@ -50,7 +50,7 @@ public:
|
||||
testcase ("encoding");
|
||||
|
||||
Batch batch;
|
||||
createPredictableBatch (batch, 0, numObjectsToTest, seedValue);
|
||||
createPredictableBatch (batch, numObjectsToTest, seedValue);
|
||||
|
||||
EncodedBlob encoded;
|
||||
for (int i = 0; i < batch.size (); ++i)
|
||||
|
||||
Reference in New Issue
Block a user