Skip to content

Commit d5bf062

Browse files
committed
[bench] oom_sort: Last bulk of numbers was off by one resulting in a broken sort message
1 parent c6a9161 commit d5bf062

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

benchmarks/oom_sort.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ void worker(T_SRC_CONTAINER_TYPE & data, State & state) {
112112
}
113113
}
114114
}
115-
for(uint64_t i(count); i < state.entryCount; ++i) {
115+
for(uint64_t i(count+1); i <= state.entryCount; ++i) {
116116
data.push_back(i);
117117
}
118118
}
@@ -140,7 +140,7 @@ void worker(T_SRC_CONTAINER_TYPE & data, State & state) {
140140
else {
141141
for(uint64_t i(0), s(state.entryCount); i < s; ++i) {
142142
if (data.at(i) != i+1) {
143-
std::cout << "Sort is BROKEN! SHOULD=" << i << "IS=" << data.at(i) << std::endl;
143+
std::cout << "Sort is BROKEN! SHOULD=" << i+1 << "IS=" << data.at(i) << std::endl;
144144
break;
145145
}
146146
if (i % 1000 == 0) {

0 commit comments

Comments
 (0)