| 1143 | } |
| 1144 | |
| 1145 | double cond_wait_for_microsecond() { |
| 1146 | int count = 10000; |
| 1147 | std::mutex mutex; |
| 1148 | std::condition_variable cond; |
| 1149 | std::unique_lock<std::mutex> lock(mutex); |
| 1150 | |
| 1151 | uint64_t start = Cycles::rdtsc(); |
| 1152 | for (int i = 0; i < count; ++i) { |
| 1153 | cond.wait_for(lock, std::chrono::microseconds(1)); |
| 1154 | } |
| 1155 | uint64_t stop = Cycles::rdtsc(); |
| 1156 | |
| 1157 | return Cycles::toSeconds(stop - start)/count; |
| 1158 | } |
| 1159 | |
| 1160 | |
| 1161 | double uncompressedLogEntryIteration() { |