#include <derecho/utils/time.h>
#include <cstdlib>
#include <map>
#include <mutex>
#include <string>
#include <vector>
Go to the source code of this file.
|
#define | TRACE(x) |
|
#define | DERECHO_LOG(sender, message_number, event_name) |
|
#define | LOG_EVENT(group_number, message_number, block_number, event_name) |
|
|
template<class T , class U > |
size_t | index_of (T container, U elem) |
|
bool | file_exists (const std::string &name) |
|
void | create_directory (const std::string &name) |
|
double | compute_data_rate (size_t numBytes, uint64_t sTime, uint64_t eTime) |
|
void | put_flush (const char *str) |
|
void | reset_epoch () |
|
void | query_peer_addresses (std::map< uint32_t, std::string > &addresses, uint32_t &node_rank) |
|
double | compute_mean (std::vector< double > v) |
|
double | compute_stddev (std::vector< double > v) |
|
void | log_event (const char *file, int line, uint32_t group_number, size_t message_number, size_t block_number, const char *event_name) |
|
void | flush_events () |
|
void | start_flush_server () |
|
void | CHECK (bool b) |
|
◆ event
Definition at line 38 of file util.hpp.
Class Members |
size_t |
block_number |
|
const char * |
event_name |
|
const char * |
file |
|
uint32_t |
group_number |
|
int |
line |
|
size_t |
message_number |
|
uint64_t |
time |
|
◆ DERECHO_LOG
#define DERECHO_LOG |
( |
|
sender, |
|
|
|
message_number, |
|
|
|
event_name |
|
) |
| |
Value:do { \
log_event(__FILE__, __LINE__, sender, message_number, -1, event_name); \
} while(0)
Definition at line 59 of file util.hpp.
◆ LOG_EVENT
#define LOG_EVENT |
( |
|
group_number, |
|
|
|
message_number, |
|
|
|
block_number, |
|
|
|
event_name |
|
) |
| |
◆ TRACE
Value:do { \
put_flush(x); \
} while(0)
Definition at line 33 of file util.hpp.
◆ CHECK()
◆ compute_data_rate()
double compute_data_rate |
( |
size_t |
numBytes, |
|
|
uint64_t |
sTime, |
|
|
uint64_t |
eTime |
|
) |
| |
◆ compute_mean()
double compute_mean |
( |
std::vector< double > |
v | ) |
|
◆ compute_stddev()
double compute_stddev |
( |
std::vector< double > |
v | ) |
|
◆ create_directory()
void create_directory |
( |
const std::string & |
name | ) |
|
◆ file_exists()
bool file_exists |
( |
const std::string & |
name | ) |
|
◆ flush_events()
◆ index_of()
template<class T , class U >
size_t index_of |
( |
T |
container, |
|
|
U |
elem |
|
) |
| |
◆ log_event()
void log_event |
( |
const char * |
file, |
|
|
int |
line, |
|
|
uint32_t |
group_number, |
|
|
size_t |
message_number, |
|
|
size_t |
block_number, |
|
|
const char * |
event_name |
|
) |
| |
|
inline |
◆ put_flush()
void put_flush |
( |
const char * |
str | ) |
|
◆ query_peer_addresses()
void query_peer_addresses |
( |
std::map< uint32_t, std::string > & |
addresses, |
|
|
uint32_t & |
node_rank |
|
) |
| |
◆ reset_epoch()
◆ start_flush_server()
void start_flush_server |
( |
| ) |
|
◆ events
std::vector<event> events |
◆ events_mutex