diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2019-12-05 01:13:11 +0000 |
---|---|---|
committer | Henning Baldersheim <balder@yahoo-inc.com> | 2019-12-05 01:13:11 +0000 |
commit | 4b514ae5364854e9cccf3aee245774a0c5816fc4 (patch) | |
tree | 00062a8107ee2ea225369f54301eb2cc46975762 /searchcore | |
parent | 673d9aa646a4e99320cbeaa717e9362555fd9e8e (diff) |
timeSinceEpoch -> time_since_epoch.
Diffstat (limited to 'searchcore')
6 files changed, 16 insertions, 16 deletions
diff --git a/searchcore/src/tests/proton/attribute/attributeflush_test.cpp b/searchcore/src/tests/proton/attribute/attributeflush_test.cpp index c41ac3a3a1c..ea3d2c335fb 100644 --- a/searchcore/src/tests/proton/attribute/attributeflush_test.cpp +++ b/searchcore/src/tests/proton/attribute/attributeflush_test.cpp @@ -516,21 +516,21 @@ Test::requireThatLastFlushTimeIsReported() EXPECT_EQUAL(fastos::UTCTimeStamp::ZERO, ft->getLastFlushTime()); ft->initFlush(200)->run(); EXPECT_TRUE(FastOS_File::Stat("flush/a9/snapshot-200", &stat)); - EXPECT_EQUAL(stat._modifiedTime, ft->getLastFlushTime().timeSinceEpoch().time()); + EXPECT_EQUAL(stat._modifiedTime, ft->getLastFlushTime().time_since_epoch().time()); } { // snapshot flushed AttributeManagerFixture amf(f); AttributeManager &am = amf._m; amf.addAttribute("a9"); IFlushTarget::SP ft = am.getFlushable("a9"); - EXPECT_EQUAL(stat._modifiedTime, ft->getLastFlushTime().timeSinceEpoch().time()); + EXPECT_EQUAL(stat._modifiedTime, ft->getLastFlushTime().time_since_epoch().time()); { // updated flush time after nothing to flush std::this_thread::sleep_for(8000ms); - fastos::TimeStamp now = fastos::ClockSystem::now().timeSinceEpoch(); + fastos::TimeStamp now = fastos::ClockSystem::now().time_since_epoch(); Executor::Task::UP task = ft->initFlush(200); EXPECT_TRUE(task.get() == NULL); - EXPECT_LESS(stat._modifiedTime, ft->getLastFlushTime().timeSinceEpoch().time()); - EXPECT_APPROX(now.time(), ft->getLastFlushTime().timeSinceEpoch().time(), 8); + EXPECT_LESS(stat._modifiedTime, ft->getLastFlushTime().time_since_epoch().time()); + EXPECT_APPROX(now.time(), ft->getLastFlushTime().time_since_epoch().time(), 8); } } } diff --git a/searchcore/src/tests/proton/index/indexmanager_test.cpp b/searchcore/src/tests/proton/index/indexmanager_test.cpp index 51e12e70dda..1941e82a2db 100644 --- a/searchcore/src/tests/proton/index/indexmanager_test.cpp +++ b/searchcore/src/tests/proton/index/indexmanager_test.cpp @@ -280,7 +280,7 @@ TEST_F(IndexManagerTest, require_that_memory_index_is_flushed) runAsMaster([&]() { flushTask = target.initFlush(1); }); flushTask->run(); EXPECT_TRUE(FastOS_File::Stat("test_data/index.flush.1", &stat)); - EXPECT_EQ(stat._modifiedTime, target.getLastFlushTime().timeSinceEpoch().time()); + EXPECT_EQ(stat._modifiedTime, target.getLastFlushTime().time_since_epoch().time()); sources = get_source_collection(); EXPECT_EQ(2u, sources->getSourceCount()); @@ -298,17 +298,17 @@ TEST_F(IndexManagerTest, require_that_memory_index_is_flushed) { // verify last flush time when loading disk index resetIndexManager(); IndexFlushTarget target(_index_manager->getMaintainer()); - EXPECT_EQ(stat._modifiedTime, target.getLastFlushTime().timeSinceEpoch().time()); + EXPECT_EQ(stat._modifiedTime, target.getLastFlushTime().time_since_epoch().time()); // updated serial number & flush time when nothing to flush std::this_thread::sleep_for(8s); - fastos::TimeStamp now = fastos::ClockSystem::now().timeSinceEpoch(); + fastos::TimeStamp now = fastos::ClockSystem::now().time_since_epoch(); vespalib::Executor::Task::UP task; runAsMaster([&]() { task = target.initFlush(2); }); EXPECT_TRUE(task.get() == nullptr); EXPECT_EQ(2u, target.getFlushedSerialNum()); - EXPECT_LT(stat._modifiedTime, target.getLastFlushTime().timeSinceEpoch().time()); - EXPECT_NEAR(now.time(), target.getLastFlushTime().timeSinceEpoch().time(), 8); + EXPECT_LT(stat._modifiedTime, target.getLastFlushTime().time_since_epoch().time()); + EXPECT_NEAR(now.time(), target.getLastFlushTime().time_since_epoch().time(), 8); } } diff --git a/searchcore/src/vespa/searchcore/proton/attribute/flushableattribute.cpp b/searchcore/src/vespa/searchcore/proton/attribute/flushableattribute.cpp index 66d1c27a5b5..0e0e96aa871 100644 --- a/searchcore/src/vespa/searchcore/proton/attribute/flushableattribute.cpp +++ b/searchcore/src/vespa/searchcore/proton/attribute/flushableattribute.cpp @@ -211,7 +211,7 @@ FlushableAttribute::internalInitFlush(SerialNum currentSerial) if (syncToken <= getFlushedSerialNum()) { writer->setLastFlushTime(fastos::ClockSystem::now()); LOG(debug,"No attribute vector to flush. Update flush time to current: lastFlushTime(%f)", - getLastFlushTime().timeSinceEpoch().sec()); + getLastFlushTime().time_since_epoch().sec()); return Task::UP(); } return std::make_unique<Flusher>(*this, syncToken, *writer); diff --git a/searchcore/src/vespa/searchcore/proton/documentmetastore/documentmetastoreflushtarget.cpp b/searchcore/src/vespa/searchcore/proton/documentmetastore/documentmetastoreflushtarget.cpp index 2cadedd0f59..71274bf444e 100644 --- a/searchcore/src/vespa/searchcore/proton/documentmetastore/documentmetastoreflushtarget.cpp +++ b/searchcore/src/vespa/searchcore/proton/documentmetastore/documentmetastoreflushtarget.cpp @@ -223,7 +223,7 @@ DocumentMetaStoreFlushTarget::initFlush(SerialNum currentSerial) if (syncToken <= getFlushedSerialNum()) { writer->setLastFlushTime(fastos::ClockSystem::now()); LOG(debug, "No document meta store to flush. Update flush time to current: lastFlushTime(%f)", - getLastFlushTime().timeSinceEpoch().sec()); + getLastFlushTime().time_since_epoch().sec()); return Task::UP(); } return std::make_unique<Flusher>(*this, syncToken, *writer); diff --git a/searchcore/src/vespa/searchcore/proton/server/memoryflush.cpp b/searchcore/src/vespa/searchcore/proton/server/memoryflush.cpp index 8ea9e095385..86e818e0fe3 100644 --- a/searchcore/src/vespa/searchcore/proton/server/memoryflush.cpp +++ b/searchcore/src/vespa/searchcore/proton/server/memoryflush.cpp @@ -140,7 +140,7 @@ MemoryFlush::getFlushTargets(const FlushContext::List &targetList, config.maxGlobalMemory, config.maxGlobalTlsSize, config.globalDiskBloatFactor, config.maxMemoryGain, config.diskBloatFactor, config.maxTimeGain.sec(), - _startTime.timeSinceEpoch().sec()); + _startTime.time_since_epoch().sec()); for (size_t i(0), m(targetList.size()); i < m; i++) { const IFlushTarget & target(*targetList[i]->getTarget()); const IFlushHandler & handler(*targetList[i]->getHandler()); @@ -183,8 +183,8 @@ MemoryFlush::getFlushTargets(const FlushContext::List &targetList, target.getFlushedSerialNum(), localLastSerial, serialDiff, - lastFlushTime.timeSinceEpoch().sec(), - now.timeSinceEpoch().sec(), + lastFlushTime.time_since_epoch().sec(), + now.time_since_epoch().sec(), timeDiff.sec(), getOrderName(order).c_str()); } diff --git a/searchcore/src/vespa/searchcore/proton/server/pruneremoveddocumentsjob.cpp b/searchcore/src/vespa/searchcore/proton/server/pruneremoveddocumentsjob.cpp index b5a430b3bcb..8bf96b4d370 100644 --- a/searchcore/src/vespa/searchcore/proton/server/pruneremoveddocumentsjob.cpp +++ b/searchcore/src/vespa/searchcore/proton/server/pruneremoveddocumentsjob.cpp @@ -67,7 +67,7 @@ PruneRemovedDocumentsJob::run() uint64_t tshz = 1000000; fastos::UTCTimeStamp now = fastos::ClockSystem::now(); const Timestamp ageLimit(static_cast<Timestamp::Type> - ((now.timeSinceEpoch().sec() - _cfgAgeLimit) * tshz)); + ((now.time_since_epoch().sec() - _cfgAgeLimit) * tshz)); DocId lid(_nextLid); const DocId olid(lid); const DocId docIdLimit(_metaStore.getCommittedDocIdLimit()); |