From adca3a93bbb0d1af78b17b79d82c3a49564f2104 Mon Sep 17 00:00:00 2001 From: Geir Storli Date: Tue, 9 May 2017 12:48:43 +0000 Subject: Rename nextId() -> getDocIdLimit(). --- searchlib/src/apps/docstore/benchmarkdatastore.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'searchlib/src/apps') diff --git a/searchlib/src/apps/docstore/benchmarkdatastore.cpp b/searchlib/src/apps/docstore/benchmarkdatastore.cpp index 2393a82b44c..8aa2156743d 100644 --- a/searchlib/src/apps/docstore/benchmarkdatastore.cpp +++ b/searchlib/src/apps/docstore/benchmarkdatastore.cpp @@ -68,15 +68,15 @@ void BenchmarkDataStoreApp::read(size_t numReads, size_t perChunk, const IDataSt char state[8]; memset(state, 0, sizeof(state)); memset(&rstate, 0, sizeof(rstate)); - const size_t numDocs(dataStore->nextId()); - assert(numDocs > 0); + const size_t docIdLimit(dataStore->getDocIdLimit()); + assert(docIdLimit > 0); initstate_r(getpid(), state, sizeof(state), &rstate); assert(srandom_r(getpid(), &rstate) == 0); int32_t rnd(0); for ( size_t i(0); i < numReads; i++) { random_r(&rstate, &rnd); - uint32_t lid(rnd%numDocs); - for (uint32_t j(lid); j < std::min(numDocs, lid+perChunk); j++) { + uint32_t lid(rnd%docIdLimit); + for (uint32_t j(lid); j < std::min(docIdLimit, lid+perChunk); j++) { dataStore->read(j, buf); buf.clear(); } -- cgit v1.2.3