Loading src/daemon/daemon.cpp +17 −2 Original line number Diff line number Diff line Loading @@ -663,7 +663,7 @@ main(int argc, const char* argv[]) { return 0; } // TODO(dauer) move this to it's own file // TODO(dauer) move this to its own file #include <chrono> Loading Loading @@ -729,11 +729,26 @@ benchmark(string selector, long host_count) { for(size_t i = 0; i < host_count; i++) { disks.emplace_back(new VDRIVE::Disk(i, 1, "hostname", "uri")); } long next_host_id = host_count; rs_dist->addDisks(&disks); if(agedconf) { // do some iterations of add/remove with rs_dist std::vector<uint64_t> disk_ids{}; for(int age_rounds = 0; age_rounds < 10; age_rounds++) { while(disks.size() > 0) { delete disks.back(); disks.pop_back(); } for(size_t i = 0; i < host_count; i++) { disks.emplace_back( new VDRIVE::Disk(next_host_id, 1, "hostname", "uri")); disk_ids.emplace_back(next_host_id); next_host_id++; } rs_dist->addDisks(&disks); } rs_dist->removeDisks(disk_ids); } if(randomslicing) { Loading Loading
src/daemon/daemon.cpp +17 −2 Original line number Diff line number Diff line Loading @@ -663,7 +663,7 @@ main(int argc, const char* argv[]) { return 0; } // TODO(dauer) move this to it's own file // TODO(dauer) move this to its own file #include <chrono> Loading Loading @@ -729,11 +729,26 @@ benchmark(string selector, long host_count) { for(size_t i = 0; i < host_count; i++) { disks.emplace_back(new VDRIVE::Disk(i, 1, "hostname", "uri")); } long next_host_id = host_count; rs_dist->addDisks(&disks); if(agedconf) { // do some iterations of add/remove with rs_dist std::vector<uint64_t> disk_ids{}; for(int age_rounds = 0; age_rounds < 10; age_rounds++) { while(disks.size() > 0) { delete disks.back(); disks.pop_back(); } for(size_t i = 0; i < host_count; i++) { disks.emplace_back( new VDRIVE::Disk(next_host_id, 1, "hostname", "uri")); disk_ids.emplace_back(next_host_id); next_host_id++; } rs_dist->addDisks(&disks); } rs_dist->removeDisks(disk_ids); } if(randomslicing) { Loading