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

Method work

fdbserver/workloads/DDMetrics.actor.cpp:49–68  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

47 }
48
49 ACTOR Future<Void> work(Database cx, DDMetricsWorkload* self) {
50 try {
51 TraceEvent("DDMetricsWaiting").detail("StartDelay", self->startDelay);
52 wait(delay(self->startDelay));
53 TraceEvent("DDMetricsStarting").log();
54 state double startTime = now();
55 loop {
56 wait(delay(2.5));
57 int dif = wait(self->getHighPriorityRelocationsInFlight(cx, self));
58 TraceEvent("DDMetricsCheck").detail("DIF", dif);
59 if (dif == 0) {
60 self->ddDone = now() - startTime;
61 return Void();
62 }
63 }
64 } catch (Error& e) {
65 TraceEvent("DDMetricsError").error(e);
66 }
67 return Void();
68 }
69
70 Future<Void> start(Database const& cx) override { return clientId == 0 ? work(cx, this) : Void(); }
71

Callers

nothing calls this directly

Calls 8

TraceEventClass · 0.85
delayFunction · 0.85
nowFunction · 0.85
detailMethod · 0.80
VoidClass · 0.50
logMethod · 0.45
errorMethod · 0.45

Tested by

no test coverage detected