15 std::time_t now = std::time(
nullptr);
16 std::time_t diff = now -
m_last;
18 count =
m_req_count.exchange(0, std::memory_order_relaxed);
20 int qps = count / diff;
21 std::cout << qps <<
" req/s, num of clients " <<
m_clients << std::endl;
bool handle_event(tasks::worker *, int revents)
static std::atomic< int > m_req_count
static std::atomic< int > m_clients