MCPcopy Create free account
hub / github.com/apple/foundationdb / toString

Method toString

fdbserver/DataDistributionQueue.actor.cpp:385–399  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

383 }
384 void removeWork(int prio, int work) { addWork(prio, -work); }
385 std::string toString() {
386 std::string result;
387 for (int i = 1; i < ledger.size();) {
388 int j = i + 1;
389 while (j < ledger.size() && ledger[i] == ledger[j])
390 j++;
391 if (i != 1)
392 result += ", ";
393 result += i + 1 == j ? format("%03d", i * 100) : format("%03d/%03d", i * 100, (j - 1) * 100);
394 result +=
395 format("=%1.02f (%d/%d)", (float)ledger[i] / WORK_FULL_UTILIZATION, ledger[i], WORK_FULL_UTILIZATION);
396 i = j;
397 }
398 return result;
399 }
400};
401
402// find the "workFactor" for this, were it launched now

Callers 4

traceReasonItemMethod · 0.45
logRelocationMethod · 0.45
destServersStringFunction · 0.45

Calls 2

formatFunction · 0.50
sizeMethod · 0.45

Tested by

no test coverage detected