mirror of
https://github.com/scylladb/scylladb.git
synced 2026-05-12 19:02:12 +00:00
Revert "tests: Use lowres_clock in time_it()"
This reverts commit e605a0368a.
lowres_clock is not updated when reactor is not running and this
variant of time_it() is not meant to be run in a rector.
This commit is contained in:
@@ -19,10 +19,10 @@ void time_it(Func func, int iterations = 5) {
|
||||
|
||||
for (int i = 0; i < iterations; i++) {
|
||||
auto start = clk::now();
|
||||
auto end_at = lowres_clock::now() + std::chrono::seconds(1);
|
||||
auto end_at = start + std::chrono::seconds(1);
|
||||
uint64_t count = 0;
|
||||
|
||||
while (lowres_clock::now() < end_at) {
|
||||
while (clk::now() < end_at) {
|
||||
for (int i = 0; i < 10000; i++) { // amortize clock reading cost
|
||||
func();
|
||||
count++;
|
||||
|
||||
Reference in New Issue
Block a user