diff options
author | Riccardo Spagni <ric@spagni.net> | 2017-08-15 20:45:47 +0200 |
---|---|---|
committer | Riccardo Spagni <ric@spagni.net> | 2017-08-15 20:45:47 +0200 |
commit | 1cf4665d2abd9ec86e5cd09cc9262c36b89cc04b (patch) | |
tree | c90017e020bbd17ebe47fb594f944c2286fe0f0e /contrib/epee/include/profile_tools.h | |
parent | Merge pull request #2233 (diff) | |
parent | core: speed up output index unique set calculation (diff) | |
download | monero-1cf4665d2abd9ec86e5cd09cc9262c36b89cc04b.tar.xz |
Merge pull request #2237
5d4ef719 core: speed up output index unique set calculation (moneromooo-monero)
19d7f568 perf_timer: allow profiling more granular than millisecond (moneromooo-monero)
bda8c598 epee: add nanosecond timer and pause/restart profiling macros (moneromooo-monero)
Diffstat (limited to 'contrib/epee/include/profile_tools.h')
-rw-r--r-- | contrib/epee/include/profile_tools.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/contrib/epee/include/profile_tools.h b/contrib/epee/include/profile_tools.h index d3b1e4db4..f285fe48b 100644 --- a/contrib/epee/include/profile_tools.h +++ b/contrib/epee/include/profile_tools.h @@ -57,8 +57,15 @@ namespace epee #define TIME_MEASURE_START(var_name) uint64_t var_name = epee::misc_utils::get_tick_count(); +#define TIME_MEASURE_PAUSE(var_name) var_name = epee::misc_utils::get_tick_count() - var_name; +#define TIME_MEASURE_RESTART(var_name) var_name = epee::misc_utils::get_tick_count() - var_name; #define TIME_MEASURE_FINISH(var_name) var_name = epee::misc_utils::get_tick_count() - var_name; +#define TIME_MEASURE_NS_START(var_name) uint64_t var_name = epee::misc_utils::get_ns_count(); +#define TIME_MEASURE_NS_PAUSE(var_name) var_name = epee::misc_utils::get_ns_count() - var_name; +#define TIME_MEASURE_NS_RESTART(var_name) var_name = epee::misc_utils::get_ns_count() - var_name; +#define TIME_MEASURE_NS_FINISH(var_name) var_name = epee::misc_utils::get_ns_count() - var_name; + namespace profile_tools { struct local_call_account |