libfoedus-core
FOEDUS Core Library
|
A RDTSC-based low-overhead stop watch. More...
A RDTSC-based low-overhead stop watch.
Unlike foedus::debugging::StopWatch, this watch is extremely low-overhead thus can be used in performance sensitive places. Instead, it can only show cycles elapsed. You have to do the math to convert it to sec/ms/us/ns yourself. This doesn't take care of wrap around (VERY rare), either.
Definition at line 37 of file rdtsc_watch.hpp.
#include <rdtsc_watch.hpp>
Public Member Functions | |
RdtscWatch () __attribute__((always_inline)) | |
void | start () __attribute__((always_inline)) |
Take current time tick. More... | |
uint64_t | stop () __attribute__((always_inline)) |
Take another current time tick. More... | |
uint64_t | elapsed () const __attribute__((always_inline)) |
|
inline |
Definition at line 39 of file rdtsc_watch.hpp.
References start().
|
inline |
Definition at line 52 of file rdtsc_watch.hpp.
Referenced by foedus::snapshot::LogReducerRef::append_log_chunk(), foedus::storage::masstree::SplitBorder::lock_existing_records(), foedus::storage::masstree::MasstreePartitioner::partition_batch(), foedus::assorted::spin_until(), and stop().
|
inline |
Take current time tick.
Definition at line 42 of file rdtsc_watch.hpp.
References foedus::debugging::get_rdtsc().
Referenced by RdtscWatch().
|
inline |
Take another current time tick.
Returns elapsed nanosec.
Definition at line 47 of file rdtsc_watch.hpp.
References elapsed(), and foedus::debugging::get_rdtsc().
Referenced by foedus::snapshot::LogReducerRef::append_log_chunk(), foedus::storage::masstree::SplitBorder::lock_existing_records(), foedus::storage::masstree::MasstreePartitioner::partition_batch(), and foedus::assorted::spin_until().