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

Function testCopier

flow/WriteOnlySet.actor.cpp:206–216  ·  view source on GitHub ↗

occasionally copy the contents of the past set.

Source from the content-addressed store, hash-verified

204
205// occasionally copy the contents of the past set.
206void testCopier(std::shared_ptr<TestSet> set, std::chrono::seconds runFor) {
207 auto start = Clock::now();
208 while (true) {
209 if (Clock::now() - start > runFor) {
210 return;
211 }
212 auto copy = set->copy();
213 numCopied.fetch_add(copy.size());
214 std::this_thread::sleep_for(std::chrono::milliseconds(10));
215 }
216}
217
218// In a loop adds and removes a set of objects to the set
219void writer(std::shared_ptr<TestSet> set, std::chrono::seconds runFor) {

Callers 1

Calls 3

nowFunction · 0.85
copyMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected