Add a checkOnly parameter to Cycle workload.

So that it can be used in the real world for consistency checking of
backup and DR.
This commit is contained in:
Alex Miller 2019-07-05 19:09:09 -07:00
parent 5ea2e69016
commit 14e5dd74fe
1 changed files with 3 additions and 0 deletions

View File

@ -28,6 +28,7 @@ struct CycleWorkload : TestWorkload {
int actorCount, nodeCount;
double testDuration, transactionsPerSecond, minExpectedTransactionsPerSecond;
Key keyPrefix;
bool checkOnly;
vector<Future<Void>> clients;
PerfIntCounter transactions, retries, tooOldRetries, commitFailedRetries;
@ -44,6 +45,7 @@ struct CycleWorkload : TestWorkload {
nodeCount = getOption(options, LiteralStringRef("nodeCount"), transactionsPerSecond * clientCount);
keyPrefix = getOption(options, LiteralStringRef("keyPrefix"), LiteralStringRef(""));
minExpectedTransactionsPerSecond = transactionsPerSecond * getOption(options, LiteralStringRef("expectedRate"), 0.7);
checkOnly = getOption(options, LiteralStringRef("checkOnly"), false);
}
virtual std::string description() { return "CycleWorkload"; }
@ -51,6 +53,7 @@ struct CycleWorkload : TestWorkload {
return bulkSetup( cx, this, nodeCount, Promise<double>() );
}
virtual Future<Void> start( Database const& cx ) {
if (checkOnly) return Void();
for(int c=0; c<actorCount; c++)
clients.push_back(
timeout(