12 template <
class T,
class U>
15 for(
auto it = begin(container); it != end(container); ++it) {
16 if(*it == elem)
return n;
20 return container.size();
48 extern std::vector<event>
events;
59 #define DERECHO_LOG(sender, message_number, event_name) \ 61 log_event(__FILE__, __LINE__, sender, message_number, -1, event_name); \ 64 #define LOG_EVENT(group_number, message_number, block_number, event_name) \ 70 puts(
"CHECK failed, aborting.");
std::vector< event > events
double compute_stddev(std::vector< double > v)
double compute_mean(std::vector< double > v)
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 log_event(const char *file, int line, uint32_t group_number, size_t message_number, size_t block_number, const char *event_name)
void query_peer_addresses(std::map< uint32_t, std::string > &addresses, uint32_t &node_rank)
size_t index_of(T container, U elem)
void put_flush(const char *str)
void start_flush_server()