format
This commit is contained in:
parent
fb758bf937
commit
5b5087c566
|
@ -512,29 +512,29 @@ struct RolesInfo {
|
|||
}
|
||||
}
|
||||
|
||||
TraceEventFields const& busiestWriteTag = metrics.at("BusiestWriteTag");
|
||||
if(busiestWriteTag.size()) {
|
||||
int64_t tagCost = busiestWriteTag.getInt64("TagCost");
|
||||
TraceEventFields const& busiestWriteTag = metrics.at("BusiestWriteTag");
|
||||
if(busiestWriteTag.size()) {
|
||||
int64_t tagCost = busiestWriteTag.getInt64("TagCost");
|
||||
|
||||
if(tagCost > 0) {
|
||||
JsonBuilderObject busiestWriteTagObj;
|
||||
if(tagCost > 0) {
|
||||
JsonBuilderObject busiestWriteTagObj;
|
||||
|
||||
int64_t totalCost = busiestWriteTag.getInt64("TotalCost");
|
||||
ASSERT(totalCost > 0);
|
||||
int64_t totalCost = busiestWriteTag.getInt64("TotalCost");
|
||||
ASSERT(totalCost > 0);
|
||||
|
||||
busiestWriteTagObj["tag"] = busiestWriteTag.getValue("Tag");
|
||||
busiestWriteTagObj["fractional_cost"] = (double)tagCost / totalCost;
|
||||
busiestWriteTagObj["tag"] = busiestWriteTag.getValue("Tag");
|
||||
busiestWriteTagObj["fractional_cost"] = (double)tagCost / totalCost;
|
||||
|
||||
double elapsed = busiestWriteTag.getDouble("Elapsed");
|
||||
if(elapsed > 0) {
|
||||
JsonBuilderObject estimatedCostObj;
|
||||
estimatedCostObj["hz"] = tagCost / elapsed;
|
||||
busiestWriteTagObj["estimated_cost"] = estimatedCostObj;
|
||||
}
|
||||
double elapsed = busiestWriteTag.getDouble("Elapsed");
|
||||
if(elapsed > 0) {
|
||||
JsonBuilderObject estimatedCostObj;
|
||||
estimatedCostObj["hz"] = tagCost / elapsed;
|
||||
busiestWriteTagObj["estimated_cost"] = estimatedCostObj;
|
||||
}
|
||||
|
||||
obj["busiest_write_tag"] = busiestWriteTagObj;
|
||||
}
|
||||
}
|
||||
obj["busiest_write_tag"] = busiestWriteTagObj;
|
||||
}
|
||||
}
|
||||
} catch (Error& e) {
|
||||
if(e.code() != error_code_attribute_not_found)
|
||||
throw e;
|
||||
|
|
|
@ -45,19 +45,19 @@ struct TagThrottleApiWorkload : TestWorkload {
|
|||
}
|
||||
|
||||
virtual Future<Void> start(Database const& cx) {
|
||||
// choose a version to check compatibility.
|
||||
double choice = deterministicRandom()->random01();
|
||||
if(choice < 0.3) {
|
||||
apiVersion = 630;
|
||||
}
|
||||
else if(choice < 0.7){
|
||||
apiVersion = 700;
|
||||
}
|
||||
else {
|
||||
apiVersion = Database::API_VERSION_LATEST;
|
||||
}
|
||||
TraceEvent("VersionStampApiVersion").detail("ApiVersion", apiVersion);
|
||||
cx->apiVersion = apiVersion;
|
||||
// choose a version to check compatibility.
|
||||
double choice = deterministicRandom()->random01();
|
||||
if(choice < 0.3) {
|
||||
apiVersion = 630;
|
||||
}
|
||||
else if(choice < 0.7){
|
||||
apiVersion = 700;
|
||||
}
|
||||
else {
|
||||
apiVersion = Database::API_VERSION_LATEST;
|
||||
}
|
||||
TraceEvent("VersionStampApiVersion").detail("ApiVersion", apiVersion);
|
||||
cx->apiVersion = apiVersion;
|
||||
|
||||
if (this->clientId != 0) return Void();
|
||||
return timeout(runThrottleApi(this, cx), testDuration, Void());
|
||||
|
|
Loading…
Reference in New Issue