diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2019-12-08 20:11:13 +0000 |
---|---|---|
committer | Henning Baldersheim <balder@yahoo-inc.com> | 2019-12-16 23:48:46 +0000 |
commit | c72bdc628b4493bfb2974ab3fe479d2af0d376f1 (patch) | |
tree | ce2f82f3f6f7cfd6ece7ac9ae06edef92986432f /vespalib/src/tests/executor | |
parent | 6b4486254e67b61e7dbe7dab30ae50d3b0bf01bb (diff) |
WipeHistory has not been used for a very long time.
Diffstat (limited to 'vespalib/src/tests/executor')
-rw-r--r-- | vespalib/src/tests/executor/stress_test.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/vespalib/src/tests/executor/stress_test.cpp b/vespalib/src/tests/executor/stress_test.cpp index bbe754be2bd..01787e2e14c 100644 --- a/vespalib/src/tests/executor/stress_test.cpp +++ b/vespalib/src/tests/executor/stress_test.cpp @@ -60,28 +60,28 @@ uint32_t Test::calibrate(double wanted_ms) { uint32_t n = 0; - fastos::StopWatch t0; - fastos::StopWatch t1; + vespalib::Timer t0; + vespalib::Timer t1; { // calibration of calibration loop uint32_t result = 0; - double ms; + vespalib::duration dur; do { result += doStuff(++n); - t1.restart(); - ms = (t1.elapsed().ms() - t0.elapsed().ms()); - } while (ms < 1000.0); + t1 = vespalib::Timer(); + dur = (t1.elapsed() - t0.elapsed()); + } while (dur < 1s); _result += result; } { // calibrate loop - t0.restart(); + t0 = vespalib::Timer(); uint32_t result = 0; for (uint32_t i = 0; i < n; ++i) { result += doStuff(i); } _result += result; - t1.restart(); + t1 = vespalib::Timer(); } - double ms = (t1.elapsed().ms() - t0.elapsed().ms()); + double ms = vespalib::count_ms(t1.elapsed() - t0.elapsed()); double size = (((double)n) / ms) * wanted_ms; return (uint32_t) std::round(size); } @@ -121,7 +121,7 @@ Test::Main() fprintf(stderr, "all threads have been accounted for...\n"); } { - fastos::StopWatch t0; + vespalib::Timer t0; fprintf(stderr, "starting task submission...\n"); uint32_t result = 0; for (uint32_t i = 0; i < tasks; ++i) { @@ -133,7 +133,7 @@ Test::Main() } } executor.sync(); - double ms = t0.elapsed().ms(); + double ms = vespalib::count_ms(t0.elapsed()); fprintf(stderr, "total execution wall time: %g ms\n", ms); _result += result; } |