diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2019-12-09 04:09:05 +0000 |
---|---|---|
committer | Henning Baldersheim <balder@yahoo-inc.com> | 2019-12-16 23:48:46 +0000 |
commit | 225be01d5405c179584eb7fc08309c8f4a08fb22 (patch) | |
tree | fe50a91214b2db66a0df797d2dc46e51ab4bfcd1 /searchlib | |
parent | c72bdc628b4493bfb2974ab3fe479d2af0d376f1 (diff) |
GC unused timestamp in schema.
Diffstat (limited to 'searchlib')
5 files changed, 12 insertions, 13 deletions
diff --git a/searchlib/src/tests/groupingengine/groupingengine_test.cpp b/searchlib/src/tests/groupingengine/groupingengine_test.cpp index 11a661a743e..d0e2d749d08 100644 --- a/searchlib/src/tests/groupingengine/groupingengine_test.cpp +++ b/searchlib/src/tests/groupingengine/groupingengine_test.cpp @@ -1894,7 +1894,7 @@ Test::testNanSorting() EXPECT_FALSE(0.2 < myNan); EXPECT_FALSE(0.2 > myNan); - fastos::StopWatch timer; + vespalib::Timer timer; std::vector<double> groups; while (timer.elapsed().ms()() < 60000.0) { std::vector<double> vec; diff --git a/searchlib/src/tests/transactionlogstress/translogstress.cpp b/searchlib/src/tests/transactionlogstress/translogstress.cpp index 5d70c32cd7d..247e1316a7b 100644 --- a/searchlib/src/tests/transactionlogstress/translogstress.cpp +++ b/searchlib/src/tests/transactionlogstress/translogstress.cpp @@ -254,7 +254,7 @@ FeederThread::doRun() while (!_done) { if (_feedRate != 0) { - _timer.restart(); + _timer = vespalib::Timer(); for (uint32_t i = 0; i < _feedRate; ++i) { Packet::Entry entry = _generator.getRandomEntry(_current++); if (!addEntry(entry)) { diff --git a/searchlib/src/vespa/searchlib/expression/debugwaitfunctionnode.cpp b/searchlib/src/vespa/searchlib/expression/debugwaitfunctionnode.cpp index c51cd444b54..aa1fdd249a7 100644 --- a/searchlib/src/vespa/searchlib/expression/debugwaitfunctionnode.cpp +++ b/searchlib/src/vespa/searchlib/expression/debugwaitfunctionnode.cpp @@ -1,6 +1,6 @@ // Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include "debugwaitfunctionnode.h" -#include <vespa/fastos/timestamp.h> +#include <vespa/vespalib/util/time.h> namespace search::expression { @@ -30,7 +30,7 @@ using std::chrono::microseconds; bool DebugWaitFunctionNode::onExecute() const { - fastos::StopWatch::waitAtLeast(microseconds(long(_waitTime * 1000000)), _busyWait); + vespalib::Timer::waitAtLeast(vespalib::from_s(_waitTime), _busyWait); getArg().execute(); updateResult().assign(getArg().getResult()); diff --git a/searchlib/src/vespa/searchlib/features/debug_attribute_wait.cpp b/searchlib/src/vespa/searchlib/features/debug_attribute_wait.cpp index 975f510cd22..86a71184f43 100644 --- a/searchlib/src/vespa/searchlib/features/debug_attribute_wait.cpp +++ b/searchlib/src/vespa/searchlib/features/debug_attribute_wait.cpp @@ -1,11 +1,10 @@ // Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include "debug_attribute_wait.h" -#include <vespa/fastos/timestamp.h> +#include <vespa/vespalib/util/time.h> using search::attribute::IAttributeVector; using namespace search::fef; -using namespace std::chrono; namespace search::features { @@ -42,9 +41,9 @@ DebugAttributeWaitExecutor::execute(uint32_t docId) _buf.fill(*_attribute, docId); waitTime = _buf[0]; } - fastos::StopWatch timer; - fastos::StopWatch::waitAtLeast(microseconds(long(waitTime * 1000000)), _params.busyWait); - outputs().set_number(0, timer.elapsed().sec()); + vespalib::Timer timer; + vespalib::Timer::waitAtLeast(vespalib::from_s(waitTime), _params.busyWait); + outputs().set_number(0, vespalib::to_s(timer.elapsed())); } //----------------------------------------------------------------------------- diff --git a/searchlib/src/vespa/searchlib/features/debug_wait.cpp b/searchlib/src/vespa/searchlib/features/debug_wait.cpp index 79ba1678b2b..fb002564572 100644 --- a/searchlib/src/vespa/searchlib/features/debug_wait.cpp +++ b/searchlib/src/vespa/searchlib/features/debug_wait.cpp @@ -1,7 +1,7 @@ // Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include "debug_wait.h" -#include <vespa/fastos/timestamp.h> +#include <vespa/vespalib/util/time.h> using namespace search::fef; @@ -29,9 +29,9 @@ using namespace std::chrono; void DebugWaitExecutor::execute(uint32_t) { - fastos::StopWatch timer; - fastos::StopWatch::waitAtLeast(microseconds(long(_params.waitTime * 1000000)), _params.busyWait); - outputs().set_number(0, timer.elapsed().sec()); + vespalib::Timer timer; + vespalib::Timer::waitAtLeast(vespalib::from_s(_params.waitTime), _params.busyWait); + outputs().set_number(0, vespalib::to_s(timer.elapsed())); } //----------------------------------------------------------------------------- |