LogCabin
|
Classes | |
class | OptionParser |
Parses argv for the main function. More... | |
Functions | |
void | writeThreadMain (uint64_t id, const OptionParser &options, Tree tree, const std::string &key, const std::string &value, std::atomic< bool > &exit, uint64_t &writesDone) |
The main function for a single client thread. | |
uint64_t | timeNanos () |
Return the time since the Unix epoch in nanoseconds. | |
void | timerThreadMain (uint64_t timeout, std::atomic< bool > &exit) |
Main function for the timer thread, whose job is to wait until a particular timeout elapses and then set 'exit' to true. |
void anonymous_namespace{Benchmark.cc}::writeThreadMain | ( | uint64_t | id, |
const OptionParser & | options, | ||
Tree | tree, | ||
const std::string & | key, | ||
const std::string & | value, | ||
std::atomic< bool > & | exit, | ||
uint64_t & | writesDone | ||
) |
The main function for a single client thread.
id | Unique ID for this thread, counting from 0. | |
options | Arguments describing benchmark. | |
tree | Interface to LogCabin. | |
key | Key to write repeatedly. | |
value | Value to write at key repeatedly. | |
exit | When this becomes true, this thread should exit. | |
[out] | writesDone | The number of writes this thread has completed. |
Definition at line 213 of file Benchmark.cc.
uint64_t anonymous_namespace{Benchmark.cc}::timeNanos | ( | ) |
Return the time since the Unix epoch in nanoseconds.
Definition at line 236 of file Benchmark.cc.
void anonymous_namespace{Benchmark.cc}::timerThreadMain | ( | uint64_t | timeout, |
std::atomic< bool > & | exit | ||
) |
Main function for the timer thread, whose job is to wait until a particular timeout elapses and then set 'exit' to true.
timeout | Seconds to wait before setting exit to true. | |
[in,out] | exit | If this is set to true from another thread, the timer thread will exit soonish. Also, if the timeout elapses, the timer thread will set this to true and exit. |
Definition at line 255 of file Benchmark.cc.