Merge pull request #1804 from alexmiller-apple/cycle-verify-only

Add a checkOnly parameter to Cycle workload.
This commit is contained in:
Vishesh Yadav 2019-07-05 21:59:52 -07:00 committed by GitHub
commit 8d3a826c63
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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(