| 139 | } |
| 140 | |
| 141 | ACTOR Future<Void> nodeSetup(Database cx, FileSystemWorkload* self) { |
| 142 | state int i; |
| 143 | state std::vector<int> order; |
| 144 | state int nodesToSetUp = self->fileCount / self->clientCount + 1; |
| 145 | state int startingNode = nodesToSetUp * self->clientId; |
| 146 | state int batchCount = 5; |
| 147 | for (int o = 0; o <= nodesToSetUp / batchCount; o++) |
| 148 | order.push_back(o * batchCount); |
| 149 | deterministicRandom()->randomShuffle(order); |
| 150 | for (i = 0; i < order.size();) { |
| 151 | std::vector<Future<Void>> fs; |
| 152 | for (int j = 0; j < 100 && i < order.size(); j++) { |
| 153 | fs.push_back(self->setupRange( |
| 154 | cx, |
| 155 | self, |
| 156 | startingNode + order[i], |
| 157 | std::min(startingNode + order[i] + batchCount, nodesToSetUp * (self->clientId + 1)))); |
| 158 | i++; |
| 159 | } |
| 160 | wait(waitForAll(fs)); |
| 161 | } |
| 162 | TraceEvent("FileSetupOK") |
| 163 | .detail("ClientIdx", self->clientId) |
| 164 | .detail("ClientCount", self->clientCount) |
| 165 | .detail("StartingFile", startingNode) |
| 166 | .detail("FilesToSetUp", nodesToSetUp); |
| 167 | return Void(); |
| 168 | } |
| 169 | |
| 170 | ACTOR Future<Void> _start(Database cx, FileSystemWorkload* self) { |
| 171 | state FileSystemOp* operation; |
nothing calls this directly
no test coverage detected