change rate calculation

This commit is contained in:
Xiaoxi Wang 2020-08-25 18:47:13 +00:00
parent 9011ee6f57
commit b1c206b62a
1 changed files with 1 additions and 2 deletions

View File

@ -871,8 +871,7 @@ Future<Void> refreshStorageServerCommitCost(RatekeeperData *self) {
TransactionCommitCostEstimation maxCost;
double maxRate = 0, maxBusyness = 0;
for(const auto& [tag, cost] : it->value.tagCostEst) {
// costBeforeSample / #sampledOps = COMMIT_SAMPLE_COST / 1
double rate = CLIENT_KNOBS->COMMIT_SAMPLE_COST * cost.getOpsSum() / elapsed;
double rate = cost.getOpsSum() / elapsed;
if(rate > maxRate) {
busiestTag = tag;
maxRate = rate;