_ZN4epee10byte_sliceC2Ev:
   97|  1.00k|      : storage_(nullptr), portion_()
   98|  1.00k|    {}
_ZNK4epee10byte_slice4dataEv:
  133|  11.0k|    const std::uint8_t* data() const noexcept { return portion_.data(); }
_ZNK4epee10byte_slice4sizeEv:
  134|  11.0k|    std::size_t size() const noexcept { return portion_.size(); }
_ZN4epee10byte_sliceD2Ev:
  118|  8.36k|    ~byte_slice() noexcept = default;
_ZNK4epee18release_byte_sliceclEPNS_15byte_slice_dataE:
   49|  3.68k|    {
   50|  3.68k|      call(nullptr, ptr);
   51|  3.68k|    }

_ZN4epee11byte_stream5writeENS_4spanIKhEE:
  135|  3.68k|    {
  136|  3.68k|      write(source.data(), source.size());
  137|  3.68k|    }
_ZN4epee11byte_stream5writeEPKhm:
  117|  3.68k|    {
  118|  3.68k|      check(length);
  119|  3.68k|      std::memcpy(tellp(), ptr, length);
  120|  3.68k|      next_write_ += length;
  121|  3.68k|    }
_ZN4epee11byte_stream5checkEm:
   68|  11.0k|    {
   69|  11.0k|      const std::size_t remaining = available();
   70|  11.0k|      if (remaining < requested)
  ------------------
  |  Branch (70:11): [True: 3.68k, False: 7.36k]
  ------------------
   71|  3.68k|        overflow(requested);
   72|  11.0k|    }
_ZNK4epee11byte_stream9availableEv:
   93|  18.4k|    std::size_t available() const noexcept { return end_ - next_write_; }
_ZNK4epee11byte_stream5tellpEv:
   92|  11.0k|    std::uint8_t* tellp() const noexcept { return next_write_; }
_ZN4epee11byte_streamD2Ev:
   87|  3.68k|    ~byte_stream() noexcept = default;
_ZN4epee11byte_streamC2Ev:
   81|  3.68k|      : buffer_(nullptr),
   82|  3.68k|        next_write_(nullptr),
   83|  3.68k|        end_(nullptr)
   84|  3.68k|    {}
_ZN4epee11byte_stream4dataEv:
   90|  3.68k|    std::uint8_t* data() noexcept { return buffer_.get(); }
_ZNK4epee11byte_stream4sizeEv:
   94|  22.0k|    std::size_t size() const noexcept { return next_write_ - buffer_.get(); }
_ZNK4epee11byte_stream8capacityEv:
   95|  3.68k|    std::size_t capacity() const noexcept { return end_ - buffer_.get(); }
_ZN4epee11byte_stream7reserveEm:
  106|  3.68k|    {
  107|  3.68k|      check(more);
  108|  3.68k|    }
_ZN4epee11byte_stream5put_nEhm:
  179|  3.68k|    {
  180|  3.68k|      check(count);
  181|  3.68k|      std::memset(tellp(), ch, count);
  182|  3.68k|      next_write_ += count;
  183|  3.68k|    }

_ZN4epee9net_utils6bufferC2Em:
   49|  1.00k|  buffer(size_t reserve = 0): offset(0) { storage.reserve(reserve); }
_ZNK4epee9net_utils6buffer4sizeEv:
   56|  34.6k|  size_t size() const { return storage.size() - offset; }
_ZN4epee9net_utils6buffer5carveEm:
   55|  7.06k|  epee::span<const uint8_t> carve(size_t sz) { CHECK_AND_ASSERT_THROW_MES(sz <= size(), "span is too large"); offset += sz; return epee::span<const uint8_t>(storage.data() + offset - sz, sz); }
  ------------------
  |  |  175|  7.06k|#define CHECK_AND_ASSERT_THROW_MES(expr, message) do {if(!(expr)) ASSERT_MES_AND_THROW(message);} while(0)
  |  |  ------------------
  |  |  |  |  174|      0|#define ASSERT_MES_AND_THROW(message) {LOG_ERROR(message); std::stringstream ss; ss << message; throw std::runtime_error(ss.str());}
  |  |  |  |  ------------------
  |  |  |  |  |  |  100|      0|#define LOG_ERROR(x) MERROR(x)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   75|      0|#define MERROR(x) MCERROR(MONERO_DEFAULT_LOG_CATEGORY,x)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   53|      0|#define MCERROR(cat,x) MCLOG(el::Level::Error,cat, el::Color::Default, x)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |   49|      0|#define MCLOG(level, cat, color, x) MCLOG_TYPE(level, cat, color, el::base::DispatchAction::NormalLog, x)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |   43|      0|#define MCLOG_TYPE(level, cat, color, type, x) do { \
  |  |  |  |  |  |  |  |  |  |  |  |  |  |   44|      0|    if (el::Loggers::allowed(level, cat)) { \
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (44:9): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |   45|      0|      el::base::Writer(level, color, __FILE__, __LINE__, ELPP_FUNC, type).construct(cat) << x; \
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  303|      0|#  define ELPP_FUNC __PRETTY_FUNCTION__
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |   46|      0|    } \
  |  |  |  |  |  |  |  |  |  |  |  |  |  |   47|      0|  } while (0)
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (47:12): [Folded - Ignored]
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (175:58): [True: 0, False: 7.06k]
  |  |  |  Branch (175:105): [Folded - Ignored]
  |  |  ------------------
  ------------------
_ZNK4epee9net_utils6buffer4spanEm:
   53|  7.54k|  epee::span<const uint8_t> span(size_t sz) const { CHECK_AND_ASSERT_THROW_MES(sz <= size(), "span is too large"); return epee::span<const uint8_t>(storage.data() + offset, sz); }
  ------------------
  |  |  175|  7.54k|#define CHECK_AND_ASSERT_THROW_MES(expr, message) do {if(!(expr)) ASSERT_MES_AND_THROW(message);} while(0)
  |  |  ------------------
  |  |  |  |  174|      0|#define ASSERT_MES_AND_THROW(message) {LOG_ERROR(message); std::stringstream ss; ss << message; throw std::runtime_error(ss.str());}
  |  |  |  |  ------------------
  |  |  |  |  |  |  100|      0|#define LOG_ERROR(x) MERROR(x)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   75|      0|#define MERROR(x) MCERROR(MONERO_DEFAULT_LOG_CATEGORY,x)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   53|      0|#define MCERROR(cat,x) MCLOG(el::Level::Error,cat, el::Color::Default, x)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |   49|      0|#define MCLOG(level, cat, color, x) MCLOG_TYPE(level, cat, color, el::base::DispatchAction::NormalLog, x)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |   43|      0|#define MCLOG_TYPE(level, cat, color, type, x) do { \
  |  |  |  |  |  |  |  |  |  |  |  |  |  |   44|      0|    if (el::Loggers::allowed(level, cat)) { \
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (44:9): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |   45|      0|      el::base::Writer(level, color, __FILE__, __LINE__, ELPP_FUNC, type).construct(cat) << x; \
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  303|      0|#  define ELPP_FUNC __PRETTY_FUNCTION__
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |   46|      0|    } \
  |  |  |  |  |  |  |  |  |  |  |  |  |  |   47|      0|  } while (0)
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (47:12): [Folded - Ignored]
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (175:58): [True: 0, False: 7.54k]
  |  |  |  Branch (175:105): [Folded - Ignored]
  |  |  ------------------
  ------------------
_ZN4epee9net_utils6buffer5eraseEm:
   52|  7.22k|  void erase(size_t sz) { NET_BUFFER_LOG("erasing " << sz << "/" << size()); CHECK_AND_ASSERT_THROW_MES(offset + sz <= storage.size(), "erase: sz too large"); offset += sz; if (offset == storage.size()) { storage.resize(0); offset = 0; } }
  ------------------
  |  |   40|  7.22k|#define NET_BUFFER_LOG(x) ((void)0)
  ------------------
                void erase(size_t sz) { NET_BUFFER_LOG("erasing " << sz << "/" << size()); CHECK_AND_ASSERT_THROW_MES(offset + sz <= storage.size(), "erase: sz too large"); offset += sz; if (offset == storage.size()) { storage.resize(0); offset = 0; } }
  ------------------
  |  |  175|  7.22k|#define CHECK_AND_ASSERT_THROW_MES(expr, message) do {if(!(expr)) ASSERT_MES_AND_THROW(message);} while(0)
  |  |  ------------------
  |  |  |  |  174|      0|#define ASSERT_MES_AND_THROW(message) {LOG_ERROR(message); std::stringstream ss; ss << message; throw std::runtime_error(ss.str());}
  |  |  |  |  ------------------
  |  |  |  |  |  |  100|      0|#define LOG_ERROR(x) MERROR(x)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   75|      0|#define MERROR(x) MCERROR(MONERO_DEFAULT_LOG_CATEGORY,x)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   53|      0|#define MCERROR(cat,x) MCLOG(el::Level::Error,cat, el::Color::Default, x)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |   49|      0|#define MCLOG(level, cat, color, x) MCLOG_TYPE(level, cat, color, el::base::DispatchAction::NormalLog, x)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |   43|      0|#define MCLOG_TYPE(level, cat, color, type, x) do { \
  |  |  |  |  |  |  |  |  |  |  |  |  |  |   44|      0|    if (el::Loggers::allowed(level, cat)) { \
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (44:9): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |   45|      0|      el::base::Writer(level, color, __FILE__, __LINE__, ELPP_FUNC, type).construct(cat) << x; \
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  303|      0|#  define ELPP_FUNC __PRETTY_FUNCTION__
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |   46|      0|    } \
  |  |  |  |  |  |  |  |  |  |  |  |  |  |   47|      0|  } while (0)
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (47:12): [Folded - Ignored]
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (175:58): [True: 0, False: 7.22k]
  |  |  |  Branch (175:105): [Folded - Ignored]
  |  |  ------------------
  ------------------
  |  Branch (52:178): [True: 275, False: 6.94k]
  ------------------

levin.cpp:_ZN4epee5levin22levin_commands_handlerIN12_GLOBAL__N_129test_levin_connection_contextEED2Ev:
   99|  1.00k|    virtual ~levin_commands_handler(){}
_ZN4epee5levin14message_writer17finalize_responseEjj:
  154|  3.68k|    {
  155|  3.68k|      return finalize(command, LEVIN_PACKET_RESPONSE, return_code, false);
  ------------------
  |  |   80|  3.68k|#define LEVIN_PACKET_RESPONSE		0x00000002
  ------------------
  156|  3.68k|    }
_ZN4epee5levin14message_writerD2Ev:
  141|  3.68k|    ~message_writer() = default;
_ZNK4epee5levin14message_writer12payload_sizeEv:
  147|  3.68k|    {
  148|  3.68k|      return buffer.size() < sizeof(header) ? 0 : buffer.size() - sizeof(header);
  ------------------
  |  Branch (148:14): [True: 0, False: 3.68k]
  ------------------
  149|  3.68k|    }

levin.cpp:_ZN4epee5levin22async_protocol_handlerIN12_GLOBAL__N_129test_levin_connection_contextEEC2EPNS_9net_utils18i_service_endpointERNS0_29async_protocol_handler_configIS3_EERS3_:
  299|  1.00k|            m_current_head(bucket_head2()),
  300|  1.00k|            m_pservice_endpoint(psnd_hndlr), 
  301|  1.00k|            m_config(config), 
  302|  1.00k|            m_connection_context(conn_context),
  303|  1.00k|            m_max_packet_size(config.m_initial_max_packet_size),
  304|  1.00k|            m_cache_in_buffer(4 * 1024),
  305|  1.00k|            m_state(stream_state_head)
  306|  1.00k|  {
  307|  1.00k|    m_close_called = 0;
  308|  1.00k|    m_protocol_released = false;
  309|  1.00k|    m_wait_count = 0;
  310|  1.00k|    m_oponent_protocol_ver = 0;
  311|  1.00k|    m_connection_initialized = false;
  312|  1.00k|  }
levin.cpp:_ZN4epee5levin22async_protocol_handlerIN12_GLOBAL__N_129test_levin_connection_contextEED2Ev:
  314|  1.00k|  {
  315|  1.00k|    try
  316|  1.00k|    {
  317|       |
  318|  1.00k|    if(m_connection_initialized)
  ------------------
  |  Branch (318:8): [True: 1.00k, False: 0]
  ------------------
  319|  1.00k|    {
  320|  1.00k|      m_config.del_connection(this);
  321|  1.00k|    }
  322|       |
  323|  1.00k|    for (size_t i = 0; i < 60 * 1000 / 100 && 0 != m_wait_count; ++i)
  ------------------
  |  Branch (323:24): [True: 1.00k, False: 0]
  |  Branch (323:47): [True: 0, False: 1.00k]
  ------------------
  324|      0|    {
  325|      0|      misc_utils::sleep_no_w(100);
  326|      0|    }
  327|  1.00k|    CHECK_AND_ASSERT_MES_NO_RET(0 == m_wait_count, "Failed to wait for operation completion. m_wait_count = " << m_wait_count.load());
  ------------------
  |  |  200|  1.00k|#define CHECK_AND_ASSERT_MES_NO_RET(expr, message)   do{if(!(expr)) {LOG_ERROR(message); return;};}while(0)
  |  |  ------------------
  |  |  |  |  100|      0|#define LOG_ERROR(x) MERROR(x)
  |  |  |  |  ------------------
  |  |  |  |  |  |   75|      0|#define MERROR(x) MCERROR(MONERO_DEFAULT_LOG_CATEGORY,x)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   53|      0|#define MCERROR(cat,x) MCLOG(el::Level::Error,cat, el::Color::Default, x)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   49|      0|#define MCLOG(level, cat, color, x) MCLOG_TYPE(level, cat, color, el::base::DispatchAction::NormalLog, x)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |   43|      0|#define MCLOG_TYPE(level, cat, color, type, x) do { \
  |  |  |  |  |  |  |  |  |  |  |  |   44|      0|    if (el::Loggers::allowed(level, cat)) { \
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (44:9): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |   45|      0|      el::base::Writer(level, color, __FILE__, __LINE__, ELPP_FUNC, type).construct(cat) << x; \
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  303|      0|#  define ELPP_FUNC __PRETTY_FUNCTION__
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |   46|      0|    } \
  |  |  |  |  |  |  |  |  |  |  |  |   47|      0|  } while (0)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (47:12): [Folded - Ignored]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (200:60): [True: 0, False: 1.00k]
  |  |  |  Branch (200:106): [Folded - Ignored]
  |  |  ------------------
  ------------------
  328|       |
  329|  1.00k|    MTRACE(m_connection_context << "~async_protocol_handler()");
  ------------------
  |  |   79|  1.00k|#define MTRACE(x) MCTRACE(MONERO_DEFAULT_LOG_CATEGORY,x)
  |  |  ------------------
  |  |  |  |   57|  1.00k|#define MCTRACE(cat,x) MCLOG(el::Level::Trace,cat, el::Color::Default, x)
  |  |  |  |  ------------------
  |  |  |  |  |  |   49|  1.00k|#define MCLOG(level, cat, color, x) MCLOG_TYPE(level, cat, color, el::base::DispatchAction::NormalLog, x)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   43|  1.00k|#define MCLOG_TYPE(level, cat, color, type, x) do { \
  |  |  |  |  |  |  |  |   44|  1.00k|    if (el::Loggers::allowed(level, cat)) { \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (44:9): [True: 0, False: 1.00k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   45|      0|      el::base::Writer(level, color, __FILE__, __LINE__, ELPP_FUNC, type).construct(cat) << x; \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  303|      0|#  define ELPP_FUNC __PRETTY_FUNCTION__
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   46|      0|    } \
  |  |  |  |  |  |  |  |   47|  1.00k|  } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (47:12): [Folded - Ignored]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  330|       |
  331|  1.00k|    }
  332|  1.00k|    catch (...) { /* ignore */ }
  333|  1.00k|  }
levin.cpp:_ZN4epee5levin29async_protocol_handler_configIN12_GLOBAL__N_129test_levin_connection_contextEE14del_connectionEPNS0_22async_protocol_handlerIS3_EE:
  676|  1.00k|{
  677|  1.00k|  CRITICAL_REGION_BEGIN(m_connects_lock);
  ------------------
  |  |  154|  1.00k|#define  CRITICAL_REGION_BEGIN(x) { boost::this_thread::sleep_for(boost::chrono::milliseconds(epee::debug::g_test_dbg_lock_sleep())); epee::critical_region_t<decltype(x)>   critical_region_var(x)
  ------------------
  678|  1.00k|  m_connects.erase(pconn->get_connection_id());
  679|  1.00k|  CRITICAL_REGION_END();
  ------------------
  |  |  158|  1.00k|#define  CRITICAL_REGION_END() }
  ------------------
  680|  1.00k|  m_pcommands_handler->on_connection_close(pconn->m_connection_context);
  681|  1.00k|}
levin.cpp:_ZN4epee5levin22async_protocol_handlerIN12_GLOBAL__N_129test_levin_connection_contextEE17get_connection_idEv:
  669|  2.00k|  boost::uuids::uuid get_connection_id() {return m_connection_context.m_connection_id;}
levin.cpp:_ZN4epee5levin22async_protocol_handlerIN12_GLOBAL__N_129test_levin_connection_contextEE21after_init_connectionEv:
  597|  1.00k|  {
  598|  1.00k|    if (!m_connection_initialized)
  ------------------
  |  Branch (598:9): [True: 1.00k, False: 0]
  ------------------
  599|  1.00k|    {
  600|  1.00k|      m_connection_initialized = true;
  601|  1.00k|      m_config.add_connection(this);
  602|  1.00k|    }
  603|  1.00k|    return true;
  604|  1.00k|  }
levin.cpp:_ZN4epee5levin29async_protocol_handler_configIN12_GLOBAL__N_129test_levin_connection_contextEE14add_connectionEPNS0_22async_protocol_handlerIS3_EE:
  728|  1.00k|{
  729|  1.00k|  CRITICAL_REGION_BEGIN(m_connects_lock);
  ------------------
  |  |  154|  1.00k|#define  CRITICAL_REGION_BEGIN(x) { boost::this_thread::sleep_for(boost::chrono::milliseconds(epee::debug::g_test_dbg_lock_sleep())); epee::critical_region_t<decltype(x)>   critical_region_var(x)
  ------------------
  730|  1.00k|  m_connects[pconn->get_connection_id()] = pconn;
  731|  1.00k|  CRITICAL_REGION_END();
  ------------------
  |  |  158|  1.00k|#define  CRITICAL_REGION_END() }
  ------------------
  732|  1.00k|  m_pcommands_handler->on_connection_new(pconn->m_connection_context);
  733|  1.00k|}
levin.cpp:_ZN4epee5levin29async_protocol_handler_configIN12_GLOBAL__N_129test_levin_connection_contextEEC2Ev:
  121|  1.00k|  async_protocol_handler_config():m_pcommands_handler(NULL), m_pcommands_handler_destroy(NULL), m_initial_max_packet_size(LEVIN_INITIAL_MAX_PACKET_SIZE), m_max_packet_size(LEVIN_DEFAULT_MAX_PACKET_SIZE), m_invoke_timeout(LEVIN_DEFAULT_TIMEOUT_PRECONFIGURED)
  ------------------
  |  |   76|  1.00k|#define LEVIN_INITIAL_MAX_PACKET_SIZE  256*1024      // 256 KiB before handshake
  ------------------
                async_protocol_handler_config():m_pcommands_handler(NULL), m_pcommands_handler_destroy(NULL), m_initial_max_packet_size(LEVIN_INITIAL_MAX_PACKET_SIZE), m_max_packet_size(LEVIN_DEFAULT_MAX_PACKET_SIZE), m_invoke_timeout(LEVIN_DEFAULT_TIMEOUT_PRECONFIGURED)
  ------------------
  |  |   77|  1.00k|#define LEVIN_DEFAULT_MAX_PACKET_SIZE 100000000      //100MB by default after handshake
  ------------------
                async_protocol_handler_config():m_pcommands_handler(NULL), m_pcommands_handler_destroy(NULL), m_initial_max_packet_size(LEVIN_INITIAL_MAX_PACKET_SIZE), m_max_packet_size(LEVIN_DEFAULT_MAX_PACKET_SIZE), m_invoke_timeout(LEVIN_DEFAULT_TIMEOUT_PRECONFIGURED)
  ------------------
  |  |   75|  1.00k|#define LEVIN_DEFAULT_TIMEOUT_PRECONFIGURED 0
  ------------------
  122|  1.00k|  {}
levin.cpp:_ZN4epee5levin29async_protocol_handler_configIN12_GLOBAL__N_129test_levin_connection_contextEED2Ev:
  123|  1.00k|  ~async_protocol_handler_config() { set_handler(NULL, NULL); }
levin.cpp:_ZN4epee5levin29async_protocol_handler_configIN12_GLOBAL__N_129test_levin_connection_contextEE11set_handlerEPNS0_22levin_commands_handlerIS3_EEPFvS7_E:
  830|  2.00k|{
  831|  2.00k|  if (m_pcommands_handler && m_pcommands_handler_destroy)
  ------------------
  |  Branch (831:7): [True: 1.00k, False: 1.00k]
  |  Branch (831:30): [True: 1.00k, False: 0]
  ------------------
  832|  1.00k|    (*m_pcommands_handler_destroy)(m_pcommands_handler);
  833|  2.00k|  m_pcommands_handler = handler;
  834|  2.00k|  m_pcommands_handler_destroy = destroy;
  835|  2.00k|}
levin.cpp:_ZN4epee5levin22async_protocol_handlerIN12_GLOBAL__N_129test_levin_connection_contextEE11handle_recvEPKvm:
  398|  1.00k|  {
  399|  1.00k|    if(m_close_called)
  ------------------
  |  Branch (399:8): [True: 0, False: 1.00k]
  ------------------
  400|      0|      return false; //closing connections
  401|       |
  402|  1.00k|    if(!m_config.m_pcommands_handler)
  ------------------
  |  Branch (402:8): [True: 0, False: 1.00k]
  ------------------
  403|      0|    {
  404|      0|      MERROR(m_connection_context << "Commands handler not set!");
  ------------------
  |  |   75|      0|#define MERROR(x) MCERROR(MONERO_DEFAULT_LOG_CATEGORY,x)
  |  |  ------------------
  |  |  |  |   53|      0|#define MCERROR(cat,x) MCLOG(el::Level::Error,cat, el::Color::Default, x)
  |  |  |  |  ------------------
  |  |  |  |  |  |   49|      0|#define MCLOG(level, cat, color, x) MCLOG_TYPE(level, cat, color, el::base::DispatchAction::NormalLog, x)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   43|      0|#define MCLOG_TYPE(level, cat, color, type, x) do { \
  |  |  |  |  |  |  |  |   44|      0|    if (el::Loggers::allowed(level, cat)) { \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (44:9): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   45|      0|      el::base::Writer(level, color, __FILE__, __LINE__, ELPP_FUNC, type).construct(cat) << x; \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  303|      0|#  define ELPP_FUNC __PRETTY_FUNCTION__
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   46|      0|    } \
  |  |  |  |  |  |  |  |   47|      0|  } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (47:12): [Folded - Ignored]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  405|      0|      return false;
  406|      0|    }
  407|       |
  408|       |    // these should never fail, but do runtime check for safety
  409|  1.00k|    const uint64_t max_packet_size = m_max_packet_size;
  410|  1.00k|    CHECK_AND_ASSERT_MES(max_packet_size >= m_cache_in_buffer.size(), false, "Bad m_cache_in_buffer.size()");
  ------------------
  |  |  183|  1.00k|#define CHECK_AND_ASSERT_MES(expr, fail_ret_val, message)   do{if(!(expr)) {LOG_ERROR(message); return fail_ret_val;};}while(0)
  |  |  ------------------
  |  |  |  |  100|      0|#define LOG_ERROR(x) MERROR(x)
  |  |  |  |  ------------------
  |  |  |  |  |  |   75|      0|#define MERROR(x) MCERROR(MONERO_DEFAULT_LOG_CATEGORY,x)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   53|      0|#define MCERROR(cat,x) MCLOG(el::Level::Error,cat, el::Color::Default, x)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   49|      0|#define MCLOG(level, cat, color, x) MCLOG_TYPE(level, cat, color, el::base::DispatchAction::NormalLog, x)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |   43|      0|#define MCLOG_TYPE(level, cat, color, type, x) do { \
  |  |  |  |  |  |  |  |  |  |  |  |   44|      0|    if (el::Loggers::allowed(level, cat)) { \
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (44:9): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |   45|      0|      el::base::Writer(level, color, __FILE__, __LINE__, ELPP_FUNC, type).construct(cat) << x; \
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  303|      0|#  define ELPP_FUNC __PRETTY_FUNCTION__
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |   46|      0|    } \
  |  |  |  |  |  |  |  |  |  |  |  |   47|      0|  } while (0)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (47:12): [Folded - Ignored]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (183:67): [True: 0, False: 1.00k]
  |  |  |  Branch (183:126): [Folded - Ignored]
  |  |  ------------------
  ------------------
  411|  1.00k|    CHECK_AND_ASSERT_MES(max_packet_size - m_cache_in_buffer.size() >= m_fragment_buffer.size(), false, "Bad m_cache_in_buffer.size() + m_fragment_buffer.size()");
  ------------------
  |  |  183|  1.00k|#define CHECK_AND_ASSERT_MES(expr, fail_ret_val, message)   do{if(!(expr)) {LOG_ERROR(message); return fail_ret_val;};}while(0)
  |  |  ------------------
  |  |  |  |  100|      0|#define LOG_ERROR(x) MERROR(x)
  |  |  |  |  ------------------
  |  |  |  |  |  |   75|      0|#define MERROR(x) MCERROR(MONERO_DEFAULT_LOG_CATEGORY,x)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   53|      0|#define MCERROR(cat,x) MCLOG(el::Level::Error,cat, el::Color::Default, x)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   49|      0|#define MCLOG(level, cat, color, x) MCLOG_TYPE(level, cat, color, el::base::DispatchAction::NormalLog, x)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |   43|      0|#define MCLOG_TYPE(level, cat, color, type, x) do { \
  |  |  |  |  |  |  |  |  |  |  |  |   44|      0|    if (el::Loggers::allowed(level, cat)) { \
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (44:9): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |   45|      0|      el::base::Writer(level, color, __FILE__, __LINE__, ELPP_FUNC, type).construct(cat) << x; \
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  303|      0|#  define ELPP_FUNC __PRETTY_FUNCTION__
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |   46|      0|    } \
  |  |  |  |  |  |  |  |  |  |  |  |   47|      0|  } while (0)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (47:12): [Folded - Ignored]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (183:67): [True: 0, False: 1.00k]
  |  |  |  Branch (183:126): [Folded - Ignored]
  |  |  ------------------
  ------------------
  412|       |
  413|       |    // flipped to subtraction; prevent overflow since m_max_packet_size is variable and public
  414|  1.00k|    if(cb > max_packet_size - m_cache_in_buffer.size() - m_fragment_buffer.size())
  ------------------
  |  Branch (414:8): [True: 4, False: 996]
  ------------------
  415|      4|    {
  416|      4|      MWARNING(m_connection_context << "Maximum packet size exceed!, m_max_packet_size = " << max_packet_size
  ------------------
  |  |   76|      4|#define MWARNING(x) MCWARNING(MONERO_DEFAULT_LOG_CATEGORY,x)
  |  |  ------------------
  |  |  |  |   54|      4|#define MCWARNING(cat,x) MCLOG(el::Level::Warning,cat, el::Color::Default, x)
  |  |  |  |  ------------------
  |  |  |  |  |  |   49|      4|#define MCLOG(level, cat, color, x) MCLOG_TYPE(level, cat, color, el::base::DispatchAction::NormalLog, x)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   43|      4|#define MCLOG_TYPE(level, cat, color, type, x) do { \
  |  |  |  |  |  |  |  |   44|      4|    if (el::Loggers::allowed(level, cat)) { \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (44:9): [True: 0, False: 4]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   45|      0|      el::base::Writer(level, color, __FILE__, __LINE__, ELPP_FUNC, type).construct(cat) << x; \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  303|      0|#  define ELPP_FUNC __PRETTY_FUNCTION__
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   46|      0|    } \
  |  |  |  |  |  |  |  |   47|      4|  } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (47:12): [Folded - Ignored]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  417|      4|                          << ", packet received " << m_cache_in_buffer.size() +  cb 
  418|      4|                          << ", connection will be closed.");
  419|      4|      return false;
  420|      4|    }
  421|       |
  422|    996|    m_cache_in_buffer.append((const char*)ptr, cb);
  423|       |
  424|    996|    bool is_continue = true;
  425|  15.4k|    while(is_continue)
  ------------------
  |  Branch (425:11): [True: 15.0k, False: 419]
  ------------------
  426|  15.0k|    {
  427|  15.0k|      switch(m_state)
  428|  15.0k|      {
  429|  7.09k|      case stream_state_body:
  ------------------
  |  Branch (429:7): [True: 7.09k, False: 7.92k]
  ------------------
  430|  7.09k|        if(m_cache_in_buffer.size() < m_current_head.m_cb)
  ------------------
  |  Branch (430:12): [True: 33, False: 7.06k]
  ------------------
  431|     33|        {
  432|     33|          is_continue = false;
  433|     33|          if(cb >= MIN_BYTES_WANTED)
  ------------------
  |  |   50|     33|#define MIN_BYTES_WANTED	512
  ------------------
  |  Branch (433:14): [True: 14, False: 19]
  ------------------
  434|     14|          {
  435|     14|            CRITICAL_REGION_LOCAL(m_invoke_response_handlers_lock);
  ------------------
  |  |  153|     14|#define  CRITICAL_REGION_LOCAL(x) {} epee::critical_region_t<decltype(x)>   critical_region_var(x)
  ------------------
  436|     14|            if (!m_invoke_response_handlers.empty())
  ------------------
  |  Branch (436:17): [True: 0, False: 14]
  ------------------
  437|      0|            {
  438|       |              //async call scenario
  439|      0|              boost::shared_ptr<invoke_response_handler_base> response_handler = m_invoke_response_handlers.front();
  440|      0|              response_handler->reset_timer();
  441|      0|              MDEBUG(m_connection_context << "LEVIN_PACKET partial msg received. len=" << cb << ", current total " << m_cache_in_buffer.size() << "/" << m_current_head.m_cb << " (" << (100.0f * m_cache_in_buffer.size() / (m_current_head.m_cb ? m_current_head.m_cb : 1)) << "%)");
  ------------------
  |  |   78|      0|#define MDEBUG(x) MCDEBUG(MONERO_DEFAULT_LOG_CATEGORY,x)
  |  |  ------------------
  |  |  |  |   56|      0|#define MCDEBUG(cat,x) MCLOG(el::Level::Debug,cat, el::Color::Default, x)
  |  |  |  |  ------------------
  |  |  |  |  |  |   49|      0|#define MCLOG(level, cat, color, x) MCLOG_TYPE(level, cat, color, el::base::DispatchAction::NormalLog, x)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   43|      0|#define MCLOG_TYPE(level, cat, color, type, x) do { \
  |  |  |  |  |  |  |  |   44|      0|    if (el::Loggers::allowed(level, cat)) { \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (44:9): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   45|      0|      el::base::Writer(level, color, __FILE__, __LINE__, ELPP_FUNC, type).construct(cat) << x; \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  303|      0|#  define ELPP_FUNC __PRETTY_FUNCTION__
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (45:93): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   46|      0|    } \
  |  |  |  |  |  |  |  |   47|      0|  } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (47:12): [Folded - Ignored]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  442|      0|            }
  443|     14|          }
  444|     33|          break;
  445|     33|        }
  446|       |
  447|  7.06k|        {
  448|  7.06k|          std::string temp{};
  449|  7.06k|          epee::span<const uint8_t> buff_to_invoke = m_cache_in_buffer.carve((std::string::size_type)m_current_head.m_cb);
  450|  7.06k|          m_state = stream_state_head;
  451|       |
  452|       |          // abstract_tcp_server2.h manages max bandwidth for a p2p link
  453|  7.06k|          if (!(m_current_head.m_flags & (LEVIN_PACKET_REQUEST | LEVIN_PACKET_RESPONSE)))
  ------------------
  |  |   79|  7.06k|#define LEVIN_PACKET_REQUEST			0x00000001
  ------------------
                        if (!(m_current_head.m_flags & (LEVIN_PACKET_REQUEST | LEVIN_PACKET_RESPONSE)))
  ------------------
  |  |   80|  7.06k|#define LEVIN_PACKET_RESPONSE		0x00000002
  ------------------
  |  Branch (453:15): [True: 2.36k, False: 4.69k]
  ------------------
  454|  2.36k|          {
  455|       |            // special noise/fragment command
  456|  2.36k|            static constexpr const uint32_t both_flags = (LEVIN_PACKET_BEGIN | LEVIN_PACKET_END);
  ------------------
  |  |   81|  2.36k|#define LEVIN_PACKET_BEGIN		0x00000004
  ------------------
                          static constexpr const uint32_t both_flags = (LEVIN_PACKET_BEGIN | LEVIN_PACKET_END);
  ------------------
  |  |   82|  2.36k|#define LEVIN_PACKET_END		0x00000008
  ------------------
  457|  2.36k|            if ((m_current_head.m_flags & both_flags) == both_flags)
  ------------------
  |  Branch (457:17): [True: 553, False: 1.81k]
  ------------------
  458|    553|              break; // noise message, skip to next message
  459|       |
  460|  1.81k|            if (m_current_head.m_flags & LEVIN_PACKET_BEGIN)
  ------------------
  |  |   81|  1.81k|#define LEVIN_PACKET_BEGIN		0x00000004
  ------------------
  |  Branch (460:17): [True: 618, False: 1.19k]
  ------------------
  461|    618|              m_fragment_buffer.clear();
  462|       |
  463|  1.81k|            m_fragment_buffer.append(reinterpret_cast<const char*>(buff_to_invoke.data()), buff_to_invoke.size());
  464|  1.81k|            if (!(m_current_head.m_flags & LEVIN_PACKET_END))
  ------------------
  |  |   82|  1.81k|#define LEVIN_PACKET_END		0x00000008
  ------------------
  |  Branch (464:17): [True: 911, False: 904]
  ------------------
  465|    911|              break; // skip to next message
  466|       |
  467|    904|            if (m_fragment_buffer.size() < sizeof(bucket_head2))
  ------------------
  |  Branch (467:17): [True: 18, False: 886]
  ------------------
  468|     18|            {
  469|     18|              MERROR(m_connection_context << "Fragmented data too small for levin header");
  ------------------
  |  |   75|     18|#define MERROR(x) MCERROR(MONERO_DEFAULT_LOG_CATEGORY,x)
  |  |  ------------------
  |  |  |  |   53|     18|#define MCERROR(cat,x) MCLOG(el::Level::Error,cat, el::Color::Default, x)
  |  |  |  |  ------------------
  |  |  |  |  |  |   49|     18|#define MCLOG(level, cat, color, x) MCLOG_TYPE(level, cat, color, el::base::DispatchAction::NormalLog, x)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   43|     18|#define MCLOG_TYPE(level, cat, color, type, x) do { \
  |  |  |  |  |  |  |  |   44|     18|    if (el::Loggers::allowed(level, cat)) { \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (44:9): [True: 0, False: 18]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   45|      0|      el::base::Writer(level, color, __FILE__, __LINE__, ELPP_FUNC, type).construct(cat) << x; \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  303|      0|#  define ELPP_FUNC __PRETTY_FUNCTION__
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   46|      0|    } \
  |  |  |  |  |  |  |  |   47|     18|  } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (47:12): [Folded - Ignored]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  470|     18|              return false;
  471|     18|            }
  472|       |
  473|    886|            temp = std::move(m_fragment_buffer);
  474|    886|            m_fragment_buffer.clear();
  475|    886|            std::memcpy(std::addressof(m_current_head), std::addressof(temp[0]), sizeof(bucket_head2));
  476|    886|            const size_t max_bytes = m_connection_context.get_max_bytes(m_current_head.m_command);
  477|    886|            if(m_current_head.m_cb > std::min<size_t>(max_packet_size, max_bytes))
  ------------------
  |  Branch (477:16): [True: 110, False: 776]
  ------------------
  478|    110|            {
  479|    110|              MERROR(m_connection_context << "Maximum packet size exceed!, m_max_packet_size = " << std::min<size_t>(max_packet_size, max_bytes)
  ------------------
  |  |   75|    110|#define MERROR(x) MCERROR(MONERO_DEFAULT_LOG_CATEGORY,x)
  |  |  ------------------
  |  |  |  |   53|    110|#define MCERROR(cat,x) MCLOG(el::Level::Error,cat, el::Color::Default, x)
  |  |  |  |  ------------------
  |  |  |  |  |  |   49|    110|#define MCLOG(level, cat, color, x) MCLOG_TYPE(level, cat, color, el::base::DispatchAction::NormalLog, x)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   43|    110|#define MCLOG_TYPE(level, cat, color, type, x) do { \
  |  |  |  |  |  |  |  |   44|    110|    if (el::Loggers::allowed(level, cat)) { \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (44:9): [True: 0, False: 110]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   45|      0|      el::base::Writer(level, color, __FILE__, __LINE__, ELPP_FUNC, type).construct(cat) << x; \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  303|      0|#  define ELPP_FUNC __PRETTY_FUNCTION__
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   46|      0|    } \
  |  |  |  |  |  |  |  |   47|    110|  } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (47:12): [Folded - Ignored]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  480|    110|                << ", packet header received " << m_current_head.m_cb << ", command " << m_current_head.m_command
  481|    110|                << ", connection will be closed.");
  482|    110|              return false;
  483|    110|            }
  484|    776|            buff_to_invoke = {reinterpret_cast<const uint8_t*>(temp.data()) + sizeof(bucket_head2), temp.size() - sizeof(bucket_head2)};
  485|    776|          }
  486|       |
  487|  5.46k|          bool is_response = (m_oponent_protocol_ver == LEVIN_PROTOCOL_VER_1 && m_current_head.m_flags&LEVIN_PACKET_RESPONSE);
  ------------------
  |  |   86|  10.9k|#define LEVIN_PROTOCOL_VER_1         1
  ------------------
                        bool is_response = (m_oponent_protocol_ver == LEVIN_PROTOCOL_VER_1 && m_current_head.m_flags&LEVIN_PACKET_RESPONSE);
  ------------------
  |  |   80|    678|#define LEVIN_PACKET_RESPONSE		0x00000002
  ------------------
  |  Branch (487:31): [True: 678, False: 4.79k]
  |  Branch (487:81): [True: 1, False: 677]
  ------------------
  488|       |
  489|  5.46k|          MDEBUG(m_connection_context << "LEVIN_PACKET_RECEIVED. [len=" << m_current_head.m_cb
  ------------------
  |  |   78|  5.46k|#define MDEBUG(x) MCDEBUG(MONERO_DEFAULT_LOG_CATEGORY,x)
  |  |  ------------------
  |  |  |  |   56|  5.46k|#define MCDEBUG(cat,x) MCLOG(el::Level::Debug,cat, el::Color::Default, x)
  |  |  |  |  ------------------
  |  |  |  |  |  |   49|  5.46k|#define MCLOG(level, cat, color, x) MCLOG_TYPE(level, cat, color, el::base::DispatchAction::NormalLog, x)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   43|  5.46k|#define MCLOG_TYPE(level, cat, color, type, x) do { \
  |  |  |  |  |  |  |  |   44|  5.46k|    if (el::Loggers::allowed(level, cat)) { \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (44:9): [True: 0, False: 5.46k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   45|      0|      el::base::Writer(level, color, __FILE__, __LINE__, ELPP_FUNC, type).construct(cat) << x; \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  303|      0|#  define ELPP_FUNC __PRETTY_FUNCTION__
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   46|      0|    } \
  |  |  |  |  |  |  |  |   47|  5.46k|  } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (47:12): [Folded - Ignored]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  490|  5.46k|            << ", flags" << m_current_head.m_flags 
  491|  5.46k|            << ", r?=" << m_current_head.m_have_to_return_data 
  492|  5.46k|            <<", cmd = " << m_current_head.m_command 
  493|  5.46k|            << ", v=" << m_current_head.m_protocol_version);
  494|       |
  495|  5.46k|          if(is_response)
  ------------------
  |  Branch (495:14): [True: 1, False: 5.46k]
  ------------------
  496|      1|          {//response to some invoke 
  497|       |
  498|      1|            epee::critical_region_t<decltype(m_invoke_response_handlers_lock)> invoke_response_handlers_guard(m_invoke_response_handlers_lock);
  499|      1|            if(!m_invoke_response_handlers.empty())
  ------------------
  |  Branch (499:16): [True: 0, False: 1]
  ------------------
  500|      0|            {//async call scenario
  501|      0|              boost::shared_ptr<invoke_response_handler_base> response_handler = m_invoke_response_handlers.front();
  502|      0|              bool timer_cancelled = response_handler->cancel_timer();
  503|       |               // Don't pop handler, to avoid destroying it
  504|      0|              if(timer_cancelled)
  ------------------
  |  Branch (504:18): [True: 0, False: 0]
  ------------------
  505|      0|                m_invoke_response_handlers.pop_front();
  506|      0|              invoke_response_handlers_guard.unlock();
  507|       |
  508|      0|              if(timer_cancelled)
  ------------------
  |  Branch (508:18): [True: 0, False: 0]
  ------------------
  509|      0|                response_handler->handle(m_current_head.m_return_code, buff_to_invoke, m_connection_context);
  510|      0|            }
  511|      1|            else
  512|      1|            {
  513|      1|              MERROR("Received levin response but have no invoke handlers");
  ------------------
  |  |   75|      1|#define MERROR(x) MCERROR(MONERO_DEFAULT_LOG_CATEGORY,x)
  |  |  ------------------
  |  |  |  |   53|      1|#define MCERROR(cat,x) MCLOG(el::Level::Error,cat, el::Color::Default, x)
  |  |  |  |  ------------------
  |  |  |  |  |  |   49|      1|#define MCLOG(level, cat, color, x) MCLOG_TYPE(level, cat, color, el::base::DispatchAction::NormalLog, x)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   43|      1|#define MCLOG_TYPE(level, cat, color, type, x) do { \
  |  |  |  |  |  |  |  |   44|      1|    if (el::Loggers::allowed(level, cat)) { \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (44:9): [True: 0, False: 1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   45|      0|      el::base::Writer(level, color, __FILE__, __LINE__, ELPP_FUNC, type).construct(cat) << x; \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  303|      0|#  define ELPP_FUNC __PRETTY_FUNCTION__
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   46|      0|    } \
  |  |  |  |  |  |  |  |   47|      1|  } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (47:12): [Folded - Ignored]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  514|      1|              return false;
  515|      1|            }
  516|      1|          }else
  517|  5.46k|          {
  518|  5.46k|            if(m_current_head.m_have_to_return_data)
  ------------------
  |  Branch (518:16): [True: 3.68k, False: 1.78k]
  ------------------
  519|  3.68k|            {
  520|  3.68k|              levin::message_writer return_message{32 * 1024};
  521|  3.68k|              const uint32_t return_code = m_config.m_pcommands_handler->invoke(
  522|  3.68k|                m_current_head.m_command, buff_to_invoke, return_message.buffer, m_connection_context
  523|  3.68k|              );
  524|       |
  525|       |              // peer_id remains unset if dropped
  526|  3.68k|              if (m_current_head.m_command == m_connection_context.handshake_command() && m_connection_context.handshake_complete())
  ------------------
  |  Branch (526:19): [True: 1.17k, False: 2.51k]
  |  Branch (526:91): [True: 1.17k, False: 0]
  ------------------
  527|  1.17k|                m_max_packet_size = m_config.m_max_packet_size;
  528|       |
  529|  3.68k|              if(!send_message(return_message.finalize_response(m_current_head.m_command, return_code)))
  ------------------
  |  Branch (529:18): [True: 0, False: 3.68k]
  ------------------
  530|      0|                return false;
  531|  3.68k|            }
  532|  1.78k|            else
  533|  1.78k|              m_config.m_pcommands_handler->notify(m_current_head.m_command, buff_to_invoke, m_connection_context);
  534|  5.46k|          }
  535|       |          // reuse small buffer
  536|  5.46k|          if (!temp.empty() && temp.capacity() <= 64 * 1024)
  ------------------
  |  Branch (536:15): [True: 776, False: 4.69k]
  |  Branch (536:32): [True: 745, False: 31]
  ------------------
  537|    745|          {
  538|    745|            temp.clear();
  539|    745|            m_fragment_buffer = std::move(temp);
  540|    745|          }
  541|  5.46k|        }
  542|      0|        break;
  543|  7.92k|      case stream_state_head:
  ------------------
  |  Branch (543:7): [True: 7.92k, False: 7.09k]
  ------------------
  544|  7.92k|        {
  545|  7.92k|          if(m_cache_in_buffer.size() < sizeof(bucket_head2))
  ------------------
  |  Branch (545:14): [True: 524, False: 7.40k]
  ------------------
  546|    524|          {
  547|    524|            if(m_cache_in_buffer.size() >= sizeof(uint64_t) && *((uint64_t*)m_cache_in_buffer.span(8).data()) != SWAP64LE(LEVIN_SIGNATURE))
  ------------------
  |  |  285|    145|#define SWAP64LE IDENT64
  |  |  ------------------
  |  |  |  |  154|    145|#define IDENT64(x) ((uint64_t) (x))
  |  |  ------------------
  ------------------
  |  Branch (547:16): [True: 145, False: 379]
  |  Branch (547:16): [True: 138, False: 386]
  |  Branch (547:64): [True: 138, False: 7]
  ------------------
  548|    138|            {
  549|    138|              MWARNING(m_connection_context << "Signature mismatch, connection will be closed");
  ------------------
  |  |   76|    138|#define MWARNING(x) MCWARNING(MONERO_DEFAULT_LOG_CATEGORY,x)
  |  |  ------------------
  |  |  |  |   54|    138|#define MCWARNING(cat,x) MCLOG(el::Level::Warning,cat, el::Color::Default, x)
  |  |  |  |  ------------------
  |  |  |  |  |  |   49|    138|#define MCLOG(level, cat, color, x) MCLOG_TYPE(level, cat, color, el::base::DispatchAction::NormalLog, x)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   43|    138|#define MCLOG_TYPE(level, cat, color, type, x) do { \
  |  |  |  |  |  |  |  |   44|    138|    if (el::Loggers::allowed(level, cat)) { \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (44:9): [True: 0, False: 138]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   45|      0|      el::base::Writer(level, color, __FILE__, __LINE__, ELPP_FUNC, type).construct(cat) << x; \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  303|      0|#  define ELPP_FUNC __PRETTY_FUNCTION__
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   46|      0|    } \
  |  |  |  |  |  |  |  |   47|    138|  } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (47:12): [Folded - Ignored]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  550|    138|              return false;
  551|    138|            }
  552|    386|            is_continue = false;
  553|    386|            break;
  554|    524|          }
  555|       |
  556|  7.40k|#if BYTE_ORDER == LITTLE_ENDIAN
  557|  7.40k|          bucket_head2& phead = *(bucket_head2*)m_cache_in_buffer.span(sizeof(bucket_head2)).data();
  558|       |#else
  559|       |          bucket_head2 phead = *(bucket_head2*)m_cache_in_buffer.span(sizeof(bucket_head2)).data();
  560|       |          phead.m_signature = SWAP64LE(phead.m_signature);
  561|       |          phead.m_cb = SWAP64LE(phead.m_cb);
  562|       |          phead.m_command = SWAP32LE(phead.m_command);
  563|       |          phead.m_return_code = SWAP32LE(phead.m_return_code);
  564|       |          phead.m_flags = SWAP32LE(phead.m_flags);
  565|       |          phead.m_protocol_version = SWAP32LE(phead.m_protocol_version);
  566|       |#endif
  567|  7.40k|          if(LEVIN_SIGNATURE != phead.m_signature)
  ------------------
  |  |   38|  7.40k|#define LEVIN_SIGNATURE  0x0101010101012101LL  //Bender's nightmare
  ------------------
  |  Branch (567:14): [True: 184, False: 7.22k]
  ------------------
  568|    184|          {
  569|    184|            LOG_ERROR_CC(m_connection_context, "Signature mismatch, connection will be closed");
  ------------------
  |  |  469|    184|#define LOG_ERROR_CC(ct, message) MERROR(ct << message)
  |  |  ------------------
  |  |  |  |   75|    184|#define MERROR(x) MCERROR(MONERO_DEFAULT_LOG_CATEGORY,x)
  |  |  |  |  ------------------
  |  |  |  |  |  |   53|    184|#define MCERROR(cat,x) MCLOG(el::Level::Error,cat, el::Color::Default, x)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   49|    184|#define MCLOG(level, cat, color, x) MCLOG_TYPE(level, cat, color, el::base::DispatchAction::NormalLog, x)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   43|    184|#define MCLOG_TYPE(level, cat, color, type, x) do { \
  |  |  |  |  |  |  |  |  |  |   44|    184|    if (el::Loggers::allowed(level, cat)) { \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (44:9): [True: 0, False: 184]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   45|      0|      el::base::Writer(level, color, __FILE__, __LINE__, ELPP_FUNC, type).construct(cat) << x; \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  303|      0|#  define ELPP_FUNC __PRETTY_FUNCTION__
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   46|      0|    } \
  |  |  |  |  |  |  |  |  |  |   47|    184|  } while (0)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (47:12): [Folded - Ignored]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  570|    184|            return false;
  571|    184|          }
  572|  7.22k|          m_current_head = phead;
  573|       |
  574|  7.22k|          m_cache_in_buffer.erase(sizeof(bucket_head2));
  575|  7.22k|          m_state = stream_state_body;
  576|  7.22k|          m_oponent_protocol_ver = m_current_head.m_protocol_version;
  577|  7.22k|          const size_t max_bytes = m_connection_context.get_max_bytes(m_current_head.m_command);
  578|  7.22k|          if(m_current_head.m_cb > std::min<size_t>(max_packet_size, max_bytes))
  ------------------
  |  Branch (578:14): [True: 126, False: 7.09k]
  ------------------
  579|    126|          {
  580|    126|            LOG_ERROR_CC(m_connection_context, "Maximum packet size exceed!, m_max_packet_size = " << std::min<size_t>(max_packet_size, max_bytes)
  ------------------
  |  |  469|    126|#define LOG_ERROR_CC(ct, message) MERROR(ct << message)
  |  |  ------------------
  |  |  |  |   75|    126|#define MERROR(x) MCERROR(MONERO_DEFAULT_LOG_CATEGORY,x)
  |  |  |  |  ------------------
  |  |  |  |  |  |   53|    126|#define MCERROR(cat,x) MCLOG(el::Level::Error,cat, el::Color::Default, x)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   49|    126|#define MCLOG(level, cat, color, x) MCLOG_TYPE(level, cat, color, el::base::DispatchAction::NormalLog, x)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   43|    126|#define MCLOG_TYPE(level, cat, color, type, x) do { \
  |  |  |  |  |  |  |  |  |  |   44|    126|    if (el::Loggers::allowed(level, cat)) { \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (44:9): [True: 0, False: 126]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   45|      0|      el::base::Writer(level, color, __FILE__, __LINE__, ELPP_FUNC, type).construct(cat) << x; \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  303|      0|#  define ELPP_FUNC __PRETTY_FUNCTION__
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   46|      0|    } \
  |  |  |  |  |  |  |  |  |  |   47|    126|  } while (0)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (47:12): [Folded - Ignored]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  581|    126|              << ", packet header received " << m_current_head.m_cb << ", command " << m_current_head.m_command
  582|    126|              << ", connection will be closed.");
  583|    126|            return false;
  584|    126|          }
  585|  7.22k|        }
  586|  7.09k|        break;
  587|  7.09k|      default:
  ------------------
  |  Branch (587:7): [True: 0, False: 15.0k]
  ------------------
  588|      0|        LOG_ERROR_CC(m_connection_context, "Undefined state in levin_server_impl::connection_handler, m_state=" << m_state);
  ------------------
  |  |  469|      0|#define LOG_ERROR_CC(ct, message) MERROR(ct << message)
  |  |  ------------------
  |  |  |  |   75|      0|#define MERROR(x) MCERROR(MONERO_DEFAULT_LOG_CATEGORY,x)
  |  |  |  |  ------------------
  |  |  |  |  |  |   53|      0|#define MCERROR(cat,x) MCLOG(el::Level::Error,cat, el::Color::Default, x)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   49|      0|#define MCLOG(level, cat, color, x) MCLOG_TYPE(level, cat, color, el::base::DispatchAction::NormalLog, x)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   43|      0|#define MCLOG_TYPE(level, cat, color, type, x) do { \
  |  |  |  |  |  |  |  |  |  |   44|      0|    if (el::Loggers::allowed(level, cat)) { \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (44:9): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   45|      0|      el::base::Writer(level, color, __FILE__, __LINE__, ELPP_FUNC, type).construct(cat) << x; \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  303|      0|#  define ELPP_FUNC __PRETTY_FUNCTION__
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   46|      0|    } \
  |  |  |  |  |  |  |  |  |  |   47|      0|  } while (0)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (47:12): [Folded - Ignored]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  589|      0|        return false;
  590|  15.0k|      }
  591|  15.0k|    }
  592|       |
  593|    419|    return true;
  594|    996|  }
levin.cpp:_ZN4epee5levin22async_protocol_handlerIN12_GLOBAL__N_129test_levin_connection_contextEE12send_messageENS_10byte_sliceE:
  138|  3.68k|  {
  139|  3.68k|    if (message.size() < sizeof(message_writer::header))
  ------------------
  |  Branch (139:9): [True: 0, False: 3.68k]
  ------------------
  140|      0|      return false;
  141|       |
  142|  3.68k|    message_writer::header head;
  143|  3.68k|    std::memcpy(std::addressof(head), message.data(), sizeof(head));
  144|  3.68k|    if(!m_pservice_endpoint->do_send(std::move(message)))
  ------------------
  |  Branch (144:8): [True: 0, False: 3.68k]
  ------------------
  145|      0|      return false;
  146|       |
  147|  3.68k|    on_levin_traffic(m_connection_context, true, true, false, head.m_cb, head.m_command);
  148|  3.68k|    MDEBUG(m_connection_context << "LEVIN_PACKET_SENT. [len=" << head.m_cb
  ------------------
  |  |   78|  3.68k|#define MDEBUG(x) MCDEBUG(MONERO_DEFAULT_LOG_CATEGORY,x)
  |  |  ------------------
  |  |  |  |   56|  3.68k|#define MCDEBUG(cat,x) MCLOG(el::Level::Debug,cat, el::Color::Default, x)
  |  |  |  |  ------------------
  |  |  |  |  |  |   49|  3.68k|#define MCLOG(level, cat, color, x) MCLOG_TYPE(level, cat, color, el::base::DispatchAction::NormalLog, x)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   43|  3.68k|#define MCLOG_TYPE(level, cat, color, type, x) do { \
  |  |  |  |  |  |  |  |   44|  3.68k|    if (el::Loggers::allowed(level, cat)) { \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (44:9): [True: 0, False: 3.68k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   45|      0|      el::base::Writer(level, color, __FILE__, __LINE__, ELPP_FUNC, type).construct(cat) << x; \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  303|      0|#  define ELPP_FUNC __PRETTY_FUNCTION__
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   46|      0|    } \
  |  |  |  |  |  |  |  |   47|  3.68k|  } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (47:12): [Folded - Ignored]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  149|  3.68k|        << ", flags" << head.m_flags
  150|  3.68k|        << ", r?=" << head.m_have_to_return_data
  151|  3.68k|        <<", cmd = " << head.m_command
  152|  3.68k|        << ", ver=" << head.m_protocol_version);
  153|  3.68k|    return true;
  154|  3.68k|  }
levin.cpp:_Z16on_levin_trafficIN12_GLOBAL__N_129test_levin_connection_contextEEvRKT_bbbmi:
   62|  3.68k|{
   63|  3.68k|  char buf[32];
   64|  3.68k|  snprintf(buf, sizeof(buf),  "command-%u", command);
   65|  3.68k|  on_levin_traffic(context, initiator, sent, error, bytes, buf);
   66|  3.68k|}
levin.cpp:_Z16on_levin_trafficIN12_GLOBAL__N_129test_levin_connection_contextEEvRKT_bbbmPKc:
   55|  3.68k|{
   56|  3.68k|  MCINFO("net.p2p.traffic", context << bytes << " bytes " << (sent ? "sent" : "received") << (error ? "/corrupt" : "")
  ------------------
  |  |   55|  3.68k|#define MCINFO(cat,x) MCLOG(el::Level::Info,cat, el::Color::Default, x)
  |  |  ------------------
  |  |  |  |   49|  3.68k|#define MCLOG(level, cat, color, x) MCLOG_TYPE(level, cat, color, el::base::DispatchAction::NormalLog, x)
  |  |  |  |  ------------------
  |  |  |  |  |  |   43|  3.68k|#define MCLOG_TYPE(level, cat, color, type, x) do { \
  |  |  |  |  |  |   44|  3.68k|    if (el::Loggers::allowed(level, cat)) { \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (44:9): [True: 0, False: 3.68k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|      el::base::Writer(level, color, __FILE__, __LINE__, ELPP_FUNC, type).construct(cat) << x; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  303|      0|#  define ELPP_FUNC __PRETTY_FUNCTION__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:93): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (45:93): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (45:93): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   46|      0|    } \
  |  |  |  |  |  |   47|  3.68k|  } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (47:12): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   57|  3.68k|      << " for category " << category << " initiated by " << (initiator ? "us" : "peer"));
   58|  3.68k|}

_ZN4epee9net_utils23connection_context_baseC2Ev:
  401|  1.00k|    connection_context_base(): m_connection_id(),
  402|  1.00k|                               m_remote_address(),
  403|  1.00k|                               m_is_income(false),
  404|  1.00k|                               m_started(time(NULL)),
  405|  1.00k|                               m_ssl(false),
  406|  1.00k|                               m_last_recv(0),
  407|  1.00k|                               m_last_send(0),
  408|  1.00k|                               m_recv_cnt(0),
  409|  1.00k|                               m_send_cnt(0),
  410|  1.00k|                               m_current_speed_down(0),
  411|  1.00k|                               m_current_speed_up(0),
  412|  1.00k|                               m_max_speed_down(0),
  413|  1.00k|                               m_max_speed_up(0)
  414|  1.00k|    {}
_ZN4epee9net_utils15network_addressC2Ev:
  305|  1.00k|		network_address() : self(nullptr) {}
_ZN4epee9net_utils18i_service_endpointD2Ev:
  453|  1.00k|    virtual ~i_service_endpoint() noexcept(false) {}

_ZN4epee4spanIKhEC2Ev:
   76|  4.68k|    constexpr span() noexcept : ptr(nullptr), len(0) {}
_ZNK4epee4spanIKhE4dataEv:
  108|  29.5k|    constexpr pointer data() const noexcept { return ptr; }
_ZNK4epee4spanIKhE4sizeEv:
  109|  33.0k|    constexpr std::size_t size() const noexcept { return len; }
_ZN4epee7to_spanINS_10byte_sliceEEENS_4spanIKNT_10value_typeEEERKS3_:
  123|  3.68k|  {
  124|       |    // compiler provides diagnostic if size() is not size_t.
  125|  3.68k|    return {src.data(), src.size()};
  126|  3.68k|  }
_ZN4epee4spanIKhEC2IS1_vEEPT_m:
   82|  12.0k|      : ptr(src_ptr), len(count) {}
_ZN4epee4spanIKhEC2IhvEEPT_m:
   82|  14.4k|      : ptr(src_ptr), len(count) {}

_ZN4epee16critical_sectionC2Ev:
   92|  2.00k|    {
   93|  2.00k|    }
_ZN4epee5debug21g_test_dbg_lock_sleepEv:
   46|  2.00k|    {
   47|  2.00k|      static unsigned int value = 0;
   48|  2.00k|      return value;
   49|  2.00k|    }
_ZN4epee17critical_region_tINS_16critical_sectionEEC2ERS1_:
  132|  2.01k|    critical_region_t(t_lock& cs): m_locker(cs), m_unlocked(false)
  133|  2.01k|    {
  134|  2.01k|      m_locker.lock();
  135|  2.01k|    }
_ZN4epee16critical_section4lockEv:
  100|  2.01k|    {
  101|  2.01k|      m_section.lock();
  102|       |      //EnterCriticalSection( &m_section );
  103|  2.01k|    }
_ZN4epee17critical_region_tINS_16critical_sectionEED2Ev:
  138|  2.01k|    {
  139|  2.01k|      unlock();
  140|  2.01k|    }
_ZN4epee17critical_region_tINS_16critical_sectionEE6unlockEv:
  143|  2.01k|    {
  144|  2.01k|      if (!m_unlocked)
  ------------------
  |  Branch (144:11): [True: 2.01k, False: 0]
  ------------------
  145|  2.01k|      {
  146|  2.01k|        m_locker.unlock();
  147|  2.01k|        m_unlocked = true;
  148|  2.01k|      }
  149|  2.01k|    }
_ZN4epee16critical_section6unlockEv:
  106|  2.01k|    {
  107|  2.01k|      m_section.unlock();
  108|  2.01k|    }
_ZN4epee16critical_sectionD2Ev:
   96|  2.00k|    {
   97|  2.00k|    }

_ZN4epee9net_utils6buffer6appendEPKvm:
   43|    996|{
   44|    996|  const size_t capacity = storage.capacity();
   45|    996|  const size_t avail = capacity - storage.size();
   46|       |
   47|    996|  CHECK_AND_ASSERT_THROW_MES(storage.size() < std::numeric_limits<size_t>::max() - sz, "Too much data to append");
  ------------------
  |  |  175|    996|#define CHECK_AND_ASSERT_THROW_MES(expr, message) do {if(!(expr)) ASSERT_MES_AND_THROW(message);} while(0)
  |  |  ------------------
  |  |  |  |  174|      0|#define ASSERT_MES_AND_THROW(message) {LOG_ERROR(message); std::stringstream ss; ss << message; throw std::runtime_error(ss.str());}
  |  |  |  |  ------------------
  |  |  |  |  |  |  100|      0|#define LOG_ERROR(x) MERROR(x)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   75|      0|#define MERROR(x) MCERROR(MONERO_DEFAULT_LOG_CATEGORY,x)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   53|      0|#define MCERROR(cat,x) MCLOG(el::Level::Error,cat, el::Color::Default, x)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |   49|      0|#define MCLOG(level, cat, color, x) MCLOG_TYPE(level, cat, color, el::base::DispatchAction::NormalLog, x)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |   43|      0|#define MCLOG_TYPE(level, cat, color, type, x) do { \
  |  |  |  |  |  |  |  |  |  |  |  |  |  |   44|      0|    if (el::Loggers::allowed(level, cat)) { \
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (44:9): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |   45|      0|      el::base::Writer(level, color, __FILE__, __LINE__, ELPP_FUNC, type).construct(cat) << x; \
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  303|      0|#  define ELPP_FUNC __PRETTY_FUNCTION__
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |   46|      0|    } \
  |  |  |  |  |  |  |  |  |  |  |  |  |  |   47|      0|  } while (0)
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (47:12): [Folded - Ignored]
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (175:58): [True: 0, False: 996]
  |  |  |  Branch (175:105): [Folded - Ignored]
  |  |  ------------------
  ------------------
   48|       |
   49|       |  // decide when to move
   50|    996|  if (sz > avail)
  ------------------
  |  Branch (50:7): [True: 180, False: 816]
  ------------------
   51|    180|  {
   52|       |    // we have to reallocate or move
   53|    180|    const bool move = size() + sz <= capacity;
   54|    180|    if (move)
  ------------------
  |  Branch (54:9): [True: 0, False: 180]
  ------------------
   55|      0|    {
   56|      0|      const size_t bytes = storage.size() - offset;
   57|      0|      NET_BUFFER_LOG("appending " << sz << " from " << size() << " by moving " << bytes << " from offset " << offset << " first (forced)");
  ------------------
  |  |   40|      0|#define NET_BUFFER_LOG(x) ((void)0)
  ------------------
   58|      0|      memmove(storage.data(), storage.data() + offset, bytes);
   59|      0|      storage.resize(bytes);
   60|      0|      offset = 0;
   61|      0|    }
   62|    180|    else
   63|    180|    {
   64|    180|      NET_BUFFER_LOG("appending " << sz << " from " << size() << " by reallocating");
  ------------------
  |  |   40|    180|#define NET_BUFFER_LOG(x) ((void)0)
  ------------------
   65|    180|      std::vector<uint8_t> new_storage;
   66|    180|      size_t reserve = (((size() + sz) * 3 / 2) + 4095) & ~4095;
   67|    180|      new_storage.reserve(reserve);
   68|    180|      new_storage.resize(size());
   69|    180|      if (size() > 0)
  ------------------
  |  Branch (69:11): [True: 0, False: 180]
  ------------------
   70|      0|        memcpy(new_storage.data(), storage.data() + offset, storage.size() - offset);
   71|    180|      offset = 0;
   72|    180|      std::swap(storage, new_storage);
   73|    180|    }
   74|    180|  }
   75|    816|  else
   76|    816|  {
   77|       |    // we have space already
   78|    816|    if (size() <= 4096 && offset > 4096 * 16 && offset >= capacity / 2)
  ------------------
  |  Branch (78:9): [True: 816, False: 0]
  |  Branch (78:27): [True: 0, False: 816]
  |  Branch (78:49): [True: 0, False: 0]
  ------------------
   79|      0|    {
   80|       |      // we have little to move, and we're far enough into the buffer that it's probably a win to move anyway
   81|      0|      const size_t pos = storage.size() - offset;
   82|      0|      NET_BUFFER_LOG("appending " << sz << " from " << size() << " by moving " << pos << " from offset " << offset << " first (unforced)");
  ------------------
  |  |   40|      0|#define NET_BUFFER_LOG(x) ((void)0)
  ------------------
   83|      0|      memmove(storage.data(), storage.data() + offset, storage.size() - offset);
   84|      0|      storage.resize(pos);
   85|      0|      offset = 0;
   86|      0|    }
   87|    816|    else
   88|    816|    {
   89|    816|      NET_BUFFER_LOG("appending " << sz << " from " << size() << " by writing to existing capacity");
  ------------------
  |  |   40|    816|#define NET_BUFFER_LOG(x) ((void)0)
  ------------------
   90|    816|    }
   91|    816|  }
   92|       |
   93|       |  // add the new data
   94|    996|  storage.insert(storage.end(), (const uint8_t*)data, (const uint8_t*)data + sz);
   95|       |
   96|    996|  NET_BUFFER_LOG("storage now " << offset << "/" << storage.size() << "/" << storage.capacity());
  ------------------
  |  |   40|    996|#define NET_BUFFER_LOG(x) ((void)0)
  ------------------
   97|    996|}

_ZN4epee18release_byte_slice4callEPvS1_:
   59|  3.68k|  {
   60|  3.68k|    if (ptr)
  ------------------
  |  Branch (60:9): [True: 3.68k, False: 0]
  ------------------
   61|  3.68k|    {
   62|  3.68k|      byte_slice_data* self = static_cast<byte_slice_data*>(ptr);
   63|  3.68k|      if (--(self->ref_count) == 0)
  ------------------
  |  Branch (63:11): [True: 3.68k, False: 0]
  ------------------
   64|  3.68k|      {
   65|  3.68k|        self->~byte_slice_data();
   66|  3.68k|        free(self);
   67|  3.68k|      }
   68|  3.68k|    }
   69|  3.68k|  }
_ZN4epee10byte_sliceC2EONS_11byte_streamEb:
  186|  3.68k|    : storage_(nullptr), portion_(stream.data(), stream.size())
  187|  3.68k|  {
  188|  3.68k|    if (portion_.size())
  ------------------
  |  Branch (188:9): [True: 3.68k, False: 0]
  ------------------
  189|  3.68k|    {
  190|  3.68k|      byte_buffer buf;
  191|  3.68k|      if (shrink && page_size <= stream.available())
  ------------------
  |  Branch (191:11): [True: 3.68k, False: 0]
  |  Branch (191:21): [True: 3.68k, False: 0]
  ------------------
  192|  3.68k|      {
  193|  3.68k|          buf = byte_buffer_resize(stream.take_buffer(), portion_.size());
  194|  3.68k|          if (!buf)
  ------------------
  |  Branch (194:15): [True: 0, False: 3.68k]
  ------------------
  195|      0|            throw std::bad_alloc{};
  196|  3.68k|          portion_ = {buf.get(), portion_.size()};
  197|  3.68k|      }
  198|      0|      else // no need to shrink buffer
  199|      0|        buf = stream.take_buffer();
  200|       |
  201|  3.68k|      std::uint8_t* const data = buf.release() - sizeof(raw_byte_slice);
  202|  3.68k|      new (data) raw_byte_slice{};
  203|  3.68k|      storage_.reset(reinterpret_cast<raw_byte_slice*>(data));
  204|  3.68k|    }
  205|      0|    else // empty stream
  206|      0|      portion_ = nullptr;
  207|  3.68k|  }
_ZN4epee10byte_sliceC2EOS0_:
  210|  3.68k|    : storage_(std::move(source.storage_)), portion_(source.portion_)
  211|  3.68k|  {
  212|  3.68k|    source.portion_ = epee::span<const std::uint8_t>{};
  213|  3.68k|  }
_ZN4epee18byte_buffer_resizeENSt3__110unique_ptrIhNS_19release_byte_bufferEEEm:
  268|  7.36k|  {
  269|  7.36k|    if (std::numeric_limits<std::size_t>::max() - sizeof(raw_byte_slice) < length)
  ------------------
  |  Branch (269:9): [True: 0, False: 7.36k]
  ------------------
  270|      0|      return nullptr;
  271|       |
  272|  7.36k|    std::uint8_t* data = buf.get();
  273|  7.36k|    if (data != nullptr)
  ------------------
  |  Branch (273:9): [True: 3.68k, False: 3.68k]
  ------------------
  274|  3.68k|      data -= sizeof(raw_byte_slice);
  275|       |
  276|  7.36k|    data = static_cast<std::uint8_t*>(std::realloc(data, sizeof(raw_byte_slice) + length));
  277|  7.36k|    if (data == nullptr)
  ------------------
  |  Branch (277:9): [True: 0, False: 7.36k]
  ------------------
  278|      0|      return nullptr;
  279|       |
  280|  7.36k|    buf.release();
  281|  7.36k|    buf.reset(data + sizeof(raw_byte_slice));
  282|  7.36k|    return buf;
  283|  7.36k|  }
_ZN4epee20byte_buffer_increaseENSt3__110unique_ptrIhNS_19release_byte_bufferEEEmm:
  286|  3.68k|  {
  287|  3.68k|    if (std::numeric_limits<std::size_t>::max() - current < more)
  ------------------
  |  Branch (287:9): [True: 0, False: 3.68k]
  ------------------
  288|      0|      throw std::range_error{"byte_buffer_increase size_t overflow"};
  289|  3.68k|    return byte_buffer_resize(std::move(buf), current + more);
  290|  3.68k|  }
byte_slice.cpp:_ZN4epee12_GLOBAL__N_114raw_byte_sliceC2Ev:
   90|  3.68k|        : byte_slice_data()
   91|  3.68k|      {}
_ZN4epee15byte_slice_dataC2Ev:
   49|  3.68k|      : ref_count(1)
   50|  3.68k|    {}
_ZN4epee15byte_slice_dataD2Ev:
   53|  3.68k|    {}

_ZN4epee11byte_stream8overflowEm:
   46|  3.68k|  {
   47|       |    // Recalculating `need` bytes removes at least one instruction from every
   48|       |    // inlined `put` call in header
   49|       |
   50|  3.68k|    assert(available() < requested);
   51|  3.68k|    const std::size_t need = requested - available();
   52|       |
   53|  3.68k|    const std::size_t len = size();
   54|  3.68k|    const std::size_t cap = capacity();
   55|  3.68k|    const std::size_t increase = std::max(std::max(need, cap), minimum_increase);
   56|       |
   57|  3.68k|    next_write_ = nullptr;
   58|  3.68k|    end_ = nullptr;
   59|       |
   60|  3.68k|    buffer_ = byte_buffer_increase(std::move(buffer_), cap, increase);
   61|  3.68k|    if (!buffer_)
  ------------------
  |  Branch (61:9): [True: 0, False: 3.68k]
  ------------------
   62|      0|      throw std::bad_alloc{};
   63|       |
   64|  3.68k|    next_write_ = buffer_.get() + len;
   65|  3.68k|    end_ = buffer_.get() + cap + increase;
   66|  3.68k|  }
_ZN4epee11byte_stream11take_bufferEv:
   91|  3.68k|  {
   92|  3.68k|    byte_buffer out{std::move(buffer_)};
   93|  3.68k|    next_write_ = nullptr;
   94|  3.68k|    end_ = nullptr;
   95|  3.68k|    return out;
   96|  3.68k|  }

_ZN4epee5levin14message_writerC2Em:
   38|  3.68k|    : buffer()
   39|  3.68k|  {
   40|  3.68k|    buffer.reserve(reserve);
   41|  3.68k|    buffer.put_n(0, sizeof(header));
   42|  3.68k|  }
_ZN4epee5levin14message_writer8finalizeEjjjb:
   45|  3.68k|  {
   46|  3.68k|    if (buffer.size() < sizeof(header))
  ------------------
  |  Branch (46:9): [True: 0, False: 3.68k]
  ------------------
   47|      0|      throw std::runtime_error{"levin_writer::finalize already called"};
   48|       |
   49|  3.68k|    header head = make_header(command, payload_size(), flags, expect_response);
   50|  3.68k|    head.m_return_code = SWAP32LE(return_code);
  ------------------
  |  |  277|  3.68k|#define SWAP32LE IDENT32
  |  |  ------------------
  |  |  |  |  153|  3.68k|#define IDENT32(x) ((uint32_t) (x))
  |  |  ------------------
  ------------------
   51|       |
   52|  3.68k|    std::memcpy(buffer.tellp() - buffer.size(), std::addressof(head), sizeof(head));
   53|  3.68k|    return byte_slice{std::move(buffer)};
   54|  3.68k|  }
_ZN4epee5levin11make_headerEjmjb:
   57|  3.68k|  {
   58|  3.68k|    bucket_head2 head = {0};
   59|  3.68k|    head.m_signature = SWAP64LE(LEVIN_SIGNATURE);
  ------------------
  |  |  285|  3.68k|#define SWAP64LE IDENT64
  |  |  ------------------
  |  |  |  |  154|  3.68k|#define IDENT64(x) ((uint64_t) (x))
  |  |  ------------------
  ------------------
   60|  3.68k|    head.m_have_to_return_data = expect_response;
   61|  3.68k|    head.m_cb = SWAP64LE(msg_size);
  ------------------
  |  |  285|  3.68k|#define SWAP64LE IDENT64
  |  |  ------------------
  |  |  |  |  154|  3.68k|#define IDENT64(x) ((uint64_t) (x))
  |  |  ------------------
  ------------------
   62|       |
   63|  3.68k|    head.m_command = SWAP32LE(command);
  ------------------
  |  |  277|  3.68k|#define SWAP32LE IDENT32
  |  |  ------------------
  |  |  |  |  153|  3.68k|#define IDENT32(x) ((uint32_t) (x))
  |  |  ------------------
  ------------------
   64|  3.68k|    head.m_protocol_version = SWAP32LE(LEVIN_PROTOCOL_VER_1);
  ------------------
  |  |  277|  3.68k|#define SWAP32LE IDENT32
  |  |  ------------------
  |  |  |  |  153|  3.68k|#define IDENT32(x) ((uint32_t) (x))
  |  |  ------------------
  ------------------
   65|  3.68k|    head.m_flags = SWAP32LE(flags);
  ------------------
  |  |  277|  3.68k|#define SWAP32LE IDENT32
  |  |  ------------------
  |  |  |  |  153|  3.68k|#define IDENT32(x) ((uint32_t) (x))
  |  |  ------------------
  ------------------
   66|  3.68k|    return head;
   67|  3.68k|  }

_ZN2el4base5debug12CrashHandlerC2Eb:
 3310|      2|CrashHandler::CrashHandler(bool useDefault) {
 3311|      2|  if (useDefault) {
  ------------------
  |  Branch (3311:7): [True: 0, False: 2]
  ------------------
 3312|      0|    setHandler(defaultCrashHandler);
 3313|      0|  }
 3314|      2|}
_ZN2el11LevelHelper12forEachLevelEPjRKNSt3__18functionIFbvEEE:
  251|  48.0k|void LevelHelper::forEachLevel(base::type::EnumType* startIndex, const std::function<bool(void)>& fn) {
  252|  48.0k|  base::type::EnumType lIndexMax = LevelHelper::kMaxValid;
  253|   336k|  do {
  254|   336k|    if (fn()) {
  ------------------
  |  Branch (254:9): [True: 0, False: 336k]
  ------------------
  255|      0|      break;
  256|      0|    }
  257|   336k|    *startIndex = static_cast<base::type::EnumType>(*startIndex << 1);
  258|   336k|  } while (*startIndex <= lIndexMax);
  ------------------
  |  Branch (258:12): [True: 288k, False: 48.0k]
  ------------------
  259|  48.0k|}
_ZN2el13ConfigurationC2ENS_5LevelENS_17ConfigurationTypeERKNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEE:
  333|   144k|  m_level(level),
  334|   144k|  m_configurationType(configurationType),
  335|   144k|  m_value(value) {
  336|   144k|}
_ZN2el13Configuration9PredicateC2ENS_5LevelENS_17ConfigurationTypeE:
  346|   401k|  m_level(level),
  347|   401k|  m_configurationType(configurationType) {
  348|   401k|}
_ZNK2el13Configuration9PredicateclEPKS0_:
  350|  14.7M|bool Configuration::Predicate::operator()(const Configuration* conf) const {
  351|  14.7M|  return ((conf != nullptr) && (conf->level() == m_level) && (conf->configurationType() == m_configurationType));
  ------------------
  |  Branch (351:11): [True: 14.7M, False: 0]
  |  Branch (351:32): [True: 1.88M, False: 12.9M]
  |  Branch (351:62): [True: 257k, False: 1.62M]
  ------------------
  352|  14.7M|}
_ZN2el14ConfigurationsC2Ev:
  357|  2.00k|  m_configurationFile(std::string()),
  358|  2.00k|  m_isFromFile(false) {
  359|  2.00k|}
_ZN2el14Configurations11setFromBaseEPS0_:
  393|  1.00k|void Configurations::setFromBase(Configurations* base) {
  394|  1.00k|  if (base == nullptr || base == this) {
  ------------------
  |  Branch (394:7): [True: 0, False: 1.00k]
  |  Branch (394:26): [True: 0, False: 1.00k]
  ------------------
  395|      0|    return;
  396|      0|  }
  397|  1.00k|  base::threading::ScopedLock scopedLock(base->lock());
  398|  72.0k|  for (Configuration*& conf : base->list()) {
  ------------------
  |  Branch (398:29): [True: 72.0k, False: 1.00k]
  ------------------
  399|  72.0k|    set(conf);
  400|  72.0k|  }
  401|  1.00k|}
_ZN2el14Configurations3setENS_5LevelENS_17ConfigurationTypeERKNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEE:
  426|   149k|void Configurations::set(Level level, ConfigurationType configurationType, const std::string& value) {
  427|   149k|  base::threading::ScopedLock scopedLock(lock());
  428|   149k|  unsafeSet(level, configurationType, value);  // This is not unsafe anymore as we have locked mutex
  429|   149k|  if (level == Level::Global) {
  ------------------
  |  Branch (429:7): [True: 18.0k, False: 131k]
  ------------------
  430|  18.0k|    unsafeSetGlobally(configurationType, value, false);  // Again this is not unsafe either
  431|  18.0k|  }
  432|   149k|}
_ZN2el14Configurations3setEPNS_13ConfigurationE:
  434|  72.0k|void Configurations::set(Configuration* conf) {
  435|  72.0k|  if (conf == nullptr) {
  ------------------
  |  Branch (435:7): [True: 0, False: 72.0k]
  ------------------
  436|      0|    return;
  437|      0|  }
  438|  72.0k|  set(conf->level(), conf->configurationType(), conf->value());
  439|  72.0k|}
_ZN2el14Configurations12setToDefaultEv:
  441|  1.00k|void Configurations::setToDefault(void) {
  442|  1.00k|  setGlobally(ConfigurationType::Enabled, std::string("true"), true);
  443|  1.00k|  setGlobally(ConfigurationType::Filename, std::string(base::consts::kDefaultLogFile), true);
  444|       |#if defined(ELPP_NO_LOG_TO_FILE)
  445|       |  setGlobally(ConfigurationType::ToFile, std::string("false"), true);
  446|       |#else
  447|  1.00k|  setGlobally(ConfigurationType::ToFile, std::string("true"), true);
  448|  1.00k|#endif // defined(ELPP_NO_LOG_TO_FILE)
  449|  1.00k|  setGlobally(ConfigurationType::ToStandardOutput, std::string("true"), true);
  450|  1.00k|  setGlobally(ConfigurationType::SubsecondPrecision, std::string("3"), true);
  451|  1.00k|  setGlobally(ConfigurationType::PerformanceTracking, std::string("true"), true);
  452|  1.00k|  setGlobally(ConfigurationType::MaxLogFileSize, std::string("0"), true);
  453|  1.00k|  setGlobally(ConfigurationType::LogFlushThreshold, std::string("0"), true);
  454|       |
  455|  1.00k|  setGlobally(ConfigurationType::Format, std::string("%datetime %level [%logger] %msg"), true);
  456|  1.00k|  set(Level::Debug, ConfigurationType::Format,
  457|  1.00k|      std::string("%datetime %level [%logger] [%user@%host] [%func] [%loc] %msg"));
  458|       |  // INFO and WARNING are set to default by Level::Global
  459|  1.00k|  set(Level::Error, ConfigurationType::Format, std::string("%datetime %level [%logger] %msg"));
  460|  1.00k|  set(Level::Fatal, ConfigurationType::Format, std::string("%datetime %level [%logger] %msg"));
  461|  1.00k|  set(Level::Verbose, ConfigurationType::Format, std::string("%datetime %level-%vlevel [%logger] %msg"));
  462|  1.00k|  set(Level::Trace, ConfigurationType::Format, std::string("%datetime %level [%logger] [%func] [%loc] %msg"));
  463|  1.00k|}
_ZN2el14Configurations9unsafeSetENS_5LevelENS_17ConfigurationTypeERKNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEE:
  624|   401k|void Configurations::unsafeSet(Level level, ConfigurationType configurationType, const std::string& value) {
  625|   401k|  Configuration* conf = RegistryWithPred<Configuration, Configuration::Predicate>::get(level, configurationType);
  626|   401k|  if (conf == nullptr) {
  ------------------
  |  Branch (626:7): [True: 144k, False: 257k]
  ------------------
  627|   144k|    registerNew(new Configuration(level, configurationType, value));
  628|   257k|  } else {
  629|   257k|    conf->setValue(value);
  630|   257k|  }
  631|   401k|  if (level == Level::Global) {
  ------------------
  |  Branch (631:7): [True: 18.0k, False: 383k]
  ------------------
  632|  18.0k|    unsafeSetGlobally(configurationType, value, false);
  633|  18.0k|  }
  634|   401k|}
_ZN2el14Configurations11setGloballyENS_17ConfigurationTypeERKNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEEb:
  637|  9.00k|                                 bool includeGlobalLevel) {
  638|  9.00k|  if (includeGlobalLevel) {
  ------------------
  |  Branch (638:7): [True: 9.00k, False: 0]
  ------------------
  639|  9.00k|    set(Level::Global, configurationType, value);
  640|  9.00k|  }
  641|  9.00k|  base::type::EnumType lIndex = LevelHelper::kMinValid;
  642|  9.00k|  LevelHelper::forEachLevel(&lIndex, [&](void) -> bool {
  643|  9.00k|    set(LevelHelper::castFromInt(lIndex), configurationType, value);
  644|  9.00k|    return false;  // Do not break lambda function yet as we need to set all levels regardless
  645|  9.00k|  });
  646|  9.00k|}
_ZN2el14Configurations17unsafeSetGloballyENS_17ConfigurationTypeERKNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEEb:
  649|  36.0k|                                       bool includeGlobalLevel) {
  650|  36.0k|  if (includeGlobalLevel) {
  ------------------
  |  Branch (650:7): [True: 0, False: 36.0k]
  ------------------
  651|      0|    unsafeSet(Level::Global, configurationType, value);
  652|      0|  }
  653|  36.0k|  base::type::EnumType lIndex = LevelHelper::kMinValid;
  654|  36.0k|  LevelHelper::forEachLevel(&lIndex, [&](void) -> bool  {
  655|  36.0k|    unsafeSet(LevelHelper::castFromInt(lIndex), configurationType, value);
  656|  36.0k|    return false;  // Do not break lambda function yet as we need to set all levels regardless
  657|  36.0k|  });
  658|  36.0k|}
_ZN2el6LoggerC2ERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEERKNS_14ConfigurationsEPNS1_13unordered_mapIS7_NS1_10shared_ptrINS1_13basic_fstreamIcS4_EEEENS1_4hashIS7_EENS1_8equal_toIS7_EENS5_INS1_4pairIS8_SH_EEEEEE:
  712|  1.00k|  m_id(id),
  713|  1.00k|  m_typedConfigurations(nullptr),
  714|  1.00k|  m_parentApplicationName(std::string()),
  715|  1.00k|  m_isConfigured(false),
  716|  1.00k|  m_logStreamsReference(logStreamsReference) {
  717|  1.00k|  initUnflushedCount();
  718|  1.00k|  configure(configurations);
  719|  1.00k|}
_ZN2el6Logger9configureERKNS_14ConfigurationsE:
  745|  1.00k|void Logger::configure(const Configurations& configurations) {
  746|  1.00k|  m_isConfigured = false;  // we set it to false in case if we fail
  747|  1.00k|  initUnflushedCount();
  748|  1.00k|  if (m_typedConfigurations != nullptr) {
  ------------------
  |  Branch (748:7): [True: 0, False: 1.00k]
  ------------------
  749|      0|    Configurations* c = const_cast<Configurations*>(m_typedConfigurations->configurations());
  750|      0|    if (c->hasConfiguration(Level::Global, ConfigurationType::Filename)) {
  ------------------
  |  Branch (750:9): [True: 0, False: 0]
  ------------------
  751|      0|      flush();
  752|      0|    }
  753|      0|  }
  754|  1.00k|  base::threading::ScopedLock scopedLock(lock());
  755|  1.00k|  if (m_configurations != configurations) {
  ------------------
  |  Branch (755:7): [True: 1.00k, False: 0]
  ------------------
  756|  1.00k|    m_configurations.setFromBase(const_cast<Configurations*>(&configurations));
  757|  1.00k|  }
  758|  1.00k|  base::utils::safeDelete(m_typedConfigurations);
  759|  1.00k|  m_typedConfigurations = new base::TypedConfigurations(&m_configurations, m_logStreamsReference);
  760|  1.00k|  resolveLoggerFormatSpec();
  761|  1.00k|  m_isConfigured = true;
  762|  1.00k|}
_ZN2el6Logger9isValidIdERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE:
  769|  1.00k|bool Logger::isValidId(const std::string& id) {
  770|  8.00k|  for (std::string::const_iterator it = id.begin(); it != id.end(); ++it) {
  ------------------
  |  Branch (770:53): [True: 7.00k, False: 1.00k]
  ------------------
  771|  7.00k|    if (!base::utils::Str::contains(base::consts::kValidLoggerIdSymbols, *it)) {
  ------------------
  |  Branch (771:9): [True: 0, False: 7.00k]
  ------------------
  772|      0|      return false;
  773|      0|    }
  774|  7.00k|  }
  775|  1.00k|  return true;
  776|  1.00k|}
_ZN2el6Logger18initUnflushedCountEv:
  802|  2.00k|void Logger::initUnflushedCount(void) {
  803|  2.00k|  m_unflushedCount.clear();
  804|  2.00k|  base::type::EnumType lIndex = LevelHelper::kMinValid;
  805|  2.00k|  LevelHelper::forEachLevel(&lIndex, [&](void) -> bool {
  806|  2.00k|    m_unflushedCount.insert(std::make_pair(LevelHelper::castFromInt(lIndex), 0));
  807|  2.00k|    return false;
  808|  2.00k|  });
  809|  2.00k|}
_ZNK2el6Logger23resolveLoggerFormatSpecEv:
  811|  1.00k|void Logger::resolveLoggerFormatSpec(void) const {
  812|  1.00k|  base::type::EnumType lIndex = LevelHelper::kMinValid;
  813|  1.00k|  LevelHelper::forEachLevel(&lIndex, [&](void) -> bool {
  814|  1.00k|    base::LogFormat* logFormat =
  815|  1.00k|    const_cast<base::LogFormat*>(&m_typedConfigurations->logFormat(LevelHelper::castFromInt(lIndex)));
  816|  1.00k|    base::utils::Str::replaceFirstWithEscape(logFormat->m_format, base::consts::kLoggerIdFormatSpecifier, m_id);
  817|  1.00k|    return false;
  818|  1.00k|  });
  819|  1.00k|}
_ZN2el4base5utils3Str5ltrimERNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEE:
  988|  56.0k|std::string& Str::ltrim(std::string& str) {
  989|  56.0k|  str.erase(str.begin(), std::find_if(str.begin(), str.end(), [](char c) {
  990|  56.0k|    return !std::isspace(c);
  991|  56.0k|  } ));
  992|  56.0k|  return str;
  993|  56.0k|}
_ZN2el4base5utils3Str5rtrimERNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEE:
  995|  56.0k|std::string& Str::rtrim(std::string& str) {
  996|  56.0k|  str.erase(std::find_if(str.rbegin(), str.rend(), [](char c) {
  997|  56.0k|    return !std::isspace(c);
  998|  56.0k|  }).base(), str.end());
  999|  56.0k|  return str;
 1000|  56.0k|}
_ZN2el4base5utils3Str4trimERNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEE:
 1002|  56.0k|std::string& Str::trim(std::string& str) {
 1003|  56.0k|  return ltrim(rtrim(str));
 1004|  56.0k|}
_ZN2el4base5utils3Str22replaceFirstWithEscapeERNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEERKS9_SC_:
 1031|  23.0k|                                 const base::type::string_t& replaceWith) {
 1032|  23.0k|  std::size_t foundAt = base::type::string_t::npos;
 1033|  23.0k|  while ((foundAt = str.find(replaceWhat, foundAt + 1)) != base::type::string_t::npos) {
  ------------------
  |  Branch (1033:10): [True: 16.0k, False: 7.00k]
  ------------------
 1034|  16.0k|    if (foundAt > 0 && str[foundAt - 1] == base::consts::kFormatSpecifierChar) {
  ------------------
  |  Branch (1034:9): [True: 16.0k, False: 0]
  |  Branch (1034:24): [True: 0, False: 16.0k]
  ------------------
 1035|      0|      str.erase(foundAt - 1, 1);
 1036|      0|      ++foundAt;
 1037|  16.0k|    } else {
 1038|  16.0k|      str.replace(foundAt, replaceWhat.length(), replaceWith);
 1039|  16.0k|      return;
 1040|  16.0k|    }
 1041|  16.0k|  }
 1042|  23.0k|}
_ZN2el4base5utils3Str8containsEPKcc:
 1083|  7.00k|bool Str::contains(const char* str, char c) {
 1084|  69.0k|  for (; *str; ++str) {
  ------------------
  |  Branch (1084:10): [True: 69.0k, False: 0]
  ------------------
 1085|  69.0k|    if (*str == c)
  ------------------
  |  Branch (1085:9): [True: 7.00k, False: 62.0k]
  ------------------
 1086|  7.00k|      return true;
 1087|  69.0k|  }
 1088|      0|  return false;
 1089|  7.00k|}
_ZN2el4base5utils2OS22getEnvironmentVariableEPKcS4_S4_:
 1198|  17.0k|                                       const char* alternativeBashCommand) {
 1199|  17.0k|#if ELPP_OS_UNIX
 1200|  17.0k|  const char* val = getenv(variableName);
 1201|       |#elif ELPP_OS_WINDOWS
 1202|       |  const char* val = getWindowsEnvironmentVariable(variableName);
 1203|       |#endif  // ELPP_OS_UNIX
 1204|  17.0k|  if ((val == nullptr) || ((strcmp(val, "") == 0))) {
  ------------------
  |  Branch (1204:7): [True: 9.00k, False: 8.00k]
  |  Branch (1204:27): [True: 0, False: 8.00k]
  ------------------
 1205|       |#if ELPP_OS_UNIX && defined(ELPP_FORCE_ENV_VAR_FROM_BASH)
 1206|       |    // Try harder on unix-based systems
 1207|       |    std::string valBash = base::utils::OS::getBashOutput(alternativeBashCommand);
 1208|       |    if (valBash.empty()) {
 1209|       |      return std::string(defaultVal);
 1210|       |    } else {
 1211|       |      return valBash;
 1212|       |    }
 1213|       |#elif ELPP_OS_WINDOWS || ELPP_OS_UNIX
 1214|  9.00k|    ELPP_UNUSED(alternativeBashCommand);
  ------------------
  |  |  240|  9.00k|#define ELPP_UNUSED(x) (void)x
  ------------------
 1215|  9.00k|    return std::string(defaultVal);
 1216|  9.00k|#endif  // ELPP_OS_UNIX && defined(ELPP_FORCE_ENV_VAR_FROM_BASH)
 1217|  9.00k|  }
 1218|  8.00k|  return std::string(val);
 1219|  17.0k|}
_ZN2el4base5utils2OS11currentUserEv:
 1221|  8.00k|std::string OS::currentUser(void) {
 1222|  8.00k|#if ELPP_OS_UNIX && !ELPP_OS_ANDROID
 1223|  8.00k|  return getEnvironmentVariable("USER", base::consts::kUnknownUser, "whoami");
 1224|       |#elif ELPP_OS_WINDOWS
 1225|       |  return getEnvironmentVariable("USERNAME", base::consts::kUnknownUser);
 1226|       |#elif ELPP_OS_ANDROID
 1227|       |  ELPP_UNUSED(base::consts::kUnknownUser);
 1228|       |  return std::string("android");
 1229|       |#else
 1230|       |  return std::string();
 1231|       |#endif  // ELPP_OS_UNIX && !ELPP_OS_ANDROID
 1232|  8.00k|}
_ZN2el4base5utils2OS11currentHostEv:
 1234|  8.00k|std::string OS::currentHost(void) {
 1235|  8.00k|#if ELPP_OS_UNIX && !ELPP_OS_ANDROID
 1236|  8.00k|  return getEnvironmentVariable("HOSTNAME", base::consts::kUnknownHost, "hostname");
 1237|       |#elif ELPP_OS_WINDOWS
 1238|       |  return getEnvironmentVariable("COMPUTERNAME", base::consts::kUnknownHost);
 1239|       |#elif ELPP_OS_ANDROID
 1240|       |  ELPP_UNUSED(base::consts::kUnknownHost);
 1241|       |  return getDeviceName();
 1242|       |#else
 1243|       |  return std::string();
 1244|       |#endif  // ELPP_OS_UNIX && !ELPP_OS_ANDROID
 1245|  8.00k|}
_ZN2el4base5utils2OS17termSupportsColorEv:
 1247|  1.00k|bool OS::termSupportsColor(void) {
 1248|  1.00k|  std::string term = getEnvironmentVariable("TERM", "");
 1249|  1.00k|  return term == "xterm" || term == "xterm-color" || term == "xterm-256color"
  ------------------
  |  Branch (1249:10): [True: 0, False: 1.00k]
  |  Branch (1249:29): [True: 0, False: 1.00k]
  |  Branch (1249:54): [True: 0, False: 1.00k]
  ------------------
 1250|  1.00k|         || term == "screen" || term == "linux" || term == "cygwin"
  ------------------
  |  Branch (1250:13): [True: 0, False: 1.00k]
  |  Branch (1250:33): [True: 0, False: 1.00k]
  |  Branch (1250:52): [True: 0, False: 1.00k]
  ------------------
 1251|  1.00k|         || term == "screen-256color" || term == "screen.xterm-256color";
  ------------------
  |  Branch (1251:13): [True: 0, False: 1.00k]
  |  Branch (1251:42): [True: 0, False: 1.00k]
  ------------------
 1252|  1.00k|}
_ZN2el4base5utils15CommandLineArgs7setArgsEiPPc:
 1423|  1.00k|void CommandLineArgs::setArgs(int argc, char** argv) {
 1424|  1.00k|  m_params.clear();
 1425|  1.00k|  m_paramsWithValue.clear();
 1426|  1.00k|  if (argc == 0 || argv == nullptr) {
  ------------------
  |  Branch (1426:7): [True: 1.00k, False: 0]
  |  Branch (1426:20): [True: 0, False: 0]
  ------------------
 1427|  1.00k|    return;
 1428|  1.00k|  }
 1429|      0|  m_argc = argc;
 1430|      0|  m_argv = argv;
 1431|      0|  for (int i = 1; i < m_argc; ++i) {
  ------------------
  |  Branch (1431:19): [True: 0, False: 0]
  ------------------
 1432|      0|    const char* v = (strstr(m_argv[i], "="));
 1433|      0|    if (v != nullptr && strlen(v) > 0) {
  ------------------
  |  Branch (1433:9): [True: 0, False: 0]
  |  Branch (1433:25): [True: 0, False: 0]
  ------------------
 1434|      0|      std::string key = std::string(m_argv[i]);
 1435|      0|      key = key.substr(0, key.find_first_of('='));
 1436|      0|      if (hasParamWithValue(key.c_str())) {
  ------------------
  |  Branch (1436:11): [True: 0, False: 0]
  ------------------
 1437|      0|        ELPP_INTERNAL_INFO(1, "Skipping [" << key << "] arg since it already has value ["
 1438|      0|                           << getParamValue(key.c_str()) << "]");
 1439|      0|      } else {
 1440|      0|        m_paramsWithValue.insert(std::make_pair(key, std::string(v + 1)));
 1441|      0|      }
 1442|      0|    }
 1443|      0|    if (v == nullptr) {
  ------------------
  |  Branch (1443:9): [True: 0, False: 0]
  ------------------
 1444|      0|      if (hasParam(m_argv[i])) {
  ------------------
  |  Branch (1444:11): [True: 0, False: 0]
  ------------------
 1445|      0|        ELPP_INTERNAL_INFO(1, "Skipping [" << m_argv[i] << "] arg since it already exists");
 1446|      0|      } else {
 1447|      0|        m_params.push_back(std::string(m_argv[i]));
 1448|      0|      }
 1449|      0|    }
 1450|      0|  }
 1451|      0|}
_ZN2el4base18SubsecondPrecision4initEi:
 1510|  8.00k|void SubsecondPrecision::init(int width) {
 1511|  8.00k|  if (width < 1 || width > 6) {
  ------------------
  |  Branch (1511:7): [True: 0, False: 8.00k]
  |  Branch (1511:20): [True: 0, False: 8.00k]
  ------------------
 1512|      0|    width = base::consts::kDefaultSubsecondPrecision;
 1513|      0|  }
 1514|  8.00k|  m_width = width;
 1515|  8.00k|  switch (m_width) {
 1516|  8.00k|  case 3:
  ------------------
  |  Branch (1516:3): [True: 8.00k, False: 0]
  ------------------
 1517|  8.00k|    m_offset = 1000;
 1518|  8.00k|    break;
 1519|      0|  case 4:
  ------------------
  |  Branch (1519:3): [True: 0, False: 8.00k]
  ------------------
 1520|      0|    m_offset = 100;
 1521|      0|    break;
 1522|      0|  case 5:
  ------------------
  |  Branch (1522:3): [True: 0, False: 8.00k]
  ------------------
 1523|      0|    m_offset = 10;
 1524|      0|    break;
 1525|      0|  case 6:
  ------------------
  |  Branch (1525:3): [True: 0, False: 8.00k]
  ------------------
 1526|      0|    m_offset = 1;
 1527|      0|    break;
 1528|      0|  default:
  ------------------
  |  Branch (1528:3): [True: 0, False: 8.00k]
  ------------------
 1529|      0|    m_offset = 1000;
 1530|      0|    break;
 1531|  8.00k|  }
 1532|  8.00k|}
_ZN2el4base9LogFormatC2ENS_5LevelERKNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEE:
 1547|  8.00k|  : m_level(level), m_userFormat(format), m_currentUser(base::utils::OS::currentUser()),
 1548|  8.00k|    m_currentHost(base::utils::OS::currentHost()) {
 1549|  8.00k|  parseFromFormat(m_userFormat);
 1550|  8.00k|}
_ZN2el4base9LogFormatC2ERKS1_:
 1553|  8.00k|  m_level(logFormat.m_level),
 1554|  8.00k|  m_userFormat(logFormat.m_userFormat),
 1555|  8.00k|  m_format(logFormat.m_format),
 1556|  8.00k|  m_dateTimeFormat(logFormat.m_dateTimeFormat),
 1557|  8.00k|  m_flags(logFormat.m_flags),
 1558|  8.00k|  m_currentUser(logFormat.m_currentUser),
 1559|  8.00k|  m_currentHost(logFormat.m_currentHost) {
 1560|  8.00k|}
_ZN2el4base9LogFormatC2EOS1_:
 1562|  8.00k|LogFormat::LogFormat(LogFormat&& logFormat) {
 1563|  8.00k|  m_level = std::move(logFormat.m_level);
 1564|  8.00k|  m_userFormat = std::move(logFormat.m_userFormat);
 1565|  8.00k|  m_format = std::move(logFormat.m_format);
 1566|  8.00k|  m_dateTimeFormat = std::move(logFormat.m_dateTimeFormat);
 1567|  8.00k|  m_flags = std::move(logFormat.m_flags);
 1568|  8.00k|  m_currentUser = std::move(logFormat.m_currentUser);
 1569|  8.00k|  m_currentHost = std::move(logFormat.m_currentHost);
 1570|  8.00k|}
_ZN2el4base9LogFormateqERKS1_:
 1584|  7.00k|bool LogFormat::operator==(const LogFormat& other) {
 1585|  7.00k|  return m_level == other.m_level && m_userFormat == other.m_userFormat && m_format == other.m_format &&
  ------------------
  |  Branch (1585:10): [True: 0, False: 7.00k]
  |  Branch (1585:38): [True: 0, False: 0]
  |  Branch (1585:76): [True: 0, False: 0]
  ------------------
 1586|  7.00k|         m_dateTimeFormat == other.m_dateTimeFormat && m_flags == other.m_flags;
  ------------------
  |  Branch (1586:10): [True: 0, False: 0]
  |  Branch (1586:56): [True: 0, False: 0]
  ------------------
 1587|  7.00k|}
_ZN2el4base9LogFormat15parseFromFormatERKNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEE:
 1591|  8.00k|void LogFormat::parseFromFormat(const base::type::string_t& userFormat) {
 1592|       |  // We make copy because we will be changing the format
 1593|       |  // i.e, removing user provided date format from original format
 1594|       |  // and then storing it.
 1595|  8.00k|  base::type::string_t formatCopy = userFormat;
 1596|  8.00k|  m_flags = 0x0;
 1597|  8.00k|  auto conditionalAddFlag = [&](const base::type::char_t* specifier, base::FormatFlags flag) {
 1598|  8.00k|    std::size_t foundAt = base::type::string_t::npos;
 1599|  8.00k|    while ((foundAt = formatCopy.find(specifier, foundAt + 1)) != base::type::string_t::npos) {
 1600|  8.00k|      if (foundAt > 0 && formatCopy[foundAt - 1] == base::consts::kFormatSpecifierChar) {
 1601|  8.00k|        if (hasFlag(flag)) {
 1602|       |          // If we already have flag we remove the escape chars so that '%%' is turned to '%'
 1603|       |          // even after specifier resolution - this is because we only replaceFirst specifier
 1604|  8.00k|          formatCopy.erase(foundAt - 1, 1);
 1605|  8.00k|          ++foundAt;
 1606|  8.00k|        }
 1607|  8.00k|      } else {
 1608|  8.00k|        if (!hasFlag(flag)) addFlag(flag);
 1609|  8.00k|      }
 1610|  8.00k|    }
 1611|  8.00k|  };
 1612|  8.00k|  conditionalAddFlag(base::consts::kAppNameFormatSpecifier, base::FormatFlags::AppName);
 1613|  8.00k|  conditionalAddFlag(base::consts::kSeverityLevelFormatSpecifier, base::FormatFlags::Level);
 1614|  8.00k|  conditionalAddFlag(base::consts::kSeverityLevelShortFormatSpecifier, base::FormatFlags::LevelShort);
 1615|  8.00k|  conditionalAddFlag(base::consts::kLoggerIdFormatSpecifier, base::FormatFlags::LoggerId);
 1616|  8.00k|  conditionalAddFlag(base::consts::kThreadIdFormatSpecifier, base::FormatFlags::ThreadId);
 1617|  8.00k|  conditionalAddFlag(base::consts::kLogFileFormatSpecifier, base::FormatFlags::File);
 1618|  8.00k|  conditionalAddFlag(base::consts::kLogFileBaseFormatSpecifier, base::FormatFlags::FileBase);
 1619|  8.00k|  conditionalAddFlag(base::consts::kLogLineFormatSpecifier, base::FormatFlags::Line);
 1620|  8.00k|  conditionalAddFlag(base::consts::kLogLocationFormatSpecifier, base::FormatFlags::Location);
 1621|  8.00k|  conditionalAddFlag(base::consts::kLogFunctionFormatSpecifier, base::FormatFlags::Function);
 1622|  8.00k|  conditionalAddFlag(base::consts::kCurrentUserFormatSpecifier, base::FormatFlags::User);
 1623|  8.00k|  conditionalAddFlag(base::consts::kCurrentHostFormatSpecifier, base::FormatFlags::Host);
 1624|  8.00k|  conditionalAddFlag(base::consts::kMessageFormatSpecifier, base::FormatFlags::LogMessage);
 1625|  8.00k|  conditionalAddFlag(base::consts::kVerboseLevelFormatSpecifier, base::FormatFlags::VerboseLevel);
 1626|       |  // For date/time we need to extract user's date format first
 1627|  8.00k|  std::size_t dateIndex = std::string::npos;
 1628|  8.00k|  if ((dateIndex = formatCopy.find(base::consts::kDateTimeFormatSpecifier)) != std::string::npos) {
  ------------------
  |  Branch (1628:7): [True: 8.00k, False: 0]
  ------------------
 1629|  8.00k|    while (dateIndex > 0 && formatCopy[dateIndex - 1] == base::consts::kFormatSpecifierChar) {
  ------------------
  |  Branch (1629:12): [True: 0, False: 8.00k]
  |  Branch (1629:29): [True: 0, False: 0]
  ------------------
 1630|      0|      dateIndex = formatCopy.find(base::consts::kDateTimeFormatSpecifier, dateIndex + 1);
 1631|      0|    }
 1632|  8.00k|    if (dateIndex != std::string::npos) {
  ------------------
  |  Branch (1632:9): [True: 8.00k, False: 0]
  ------------------
 1633|  8.00k|      addFlag(base::FormatFlags::DateTime);
 1634|  8.00k|      updateDateFormat(dateIndex, formatCopy);
 1635|  8.00k|    }
 1636|  8.00k|  }
 1637|  8.00k|  m_format = formatCopy;
 1638|  8.00k|  updateFormatSpec();
 1639|  8.00k|}
_ZN2el4base9LogFormat16updateDateFormatEmRNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEE:
 1641|  8.00k|void LogFormat::updateDateFormat(std::size_t index, base::type::string_t& currFormat) {
 1642|  8.00k|  if (hasFlag(base::FormatFlags::DateTime)) {
  ------------------
  |  Branch (1642:7): [True: 8.00k, False: 0]
  ------------------
 1643|  8.00k|    index += ELPP_STRLEN(base::consts::kDateTimeFormatSpecifier);
  ------------------
  |  |  540|  8.00k|#  define ELPP_STRLEN strlen
  ------------------
 1644|  8.00k|  }
 1645|  8.00k|  const base::type::char_t* ptr = currFormat.c_str() + index;
 1646|  8.00k|  if ((currFormat.size() > index) && (ptr[0] == '{')) {
  ------------------
  |  Branch (1646:7): [True: 8.00k, False: 0]
  |  Branch (1646:38): [True: 0, False: 8.00k]
  ------------------
 1647|       |    // User has provided format for date/time
 1648|      0|    ++ptr;
 1649|      0|    int count = 1;  // Start by 1 in order to remove starting brace
 1650|      0|    std::stringstream ss;
 1651|      0|    for (; *ptr; ++ptr, ++count) {
  ------------------
  |  Branch (1651:12): [True: 0, False: 0]
  ------------------
 1652|      0|      if (*ptr == '}') {
  ------------------
  |  Branch (1652:11): [True: 0, False: 0]
  ------------------
 1653|      0|        ++count;  // In order to remove ending brace
 1654|      0|        break;
 1655|      0|      }
 1656|      0|      ss << static_cast<char>(*ptr);
 1657|      0|    }
 1658|      0|    currFormat.erase(index, count);
 1659|      0|    m_dateTimeFormat = ss.str();
 1660|  8.00k|  } else {
 1661|       |    // No format provided, use default
 1662|  8.00k|    if (hasFlag(base::FormatFlags::DateTime)) {
  ------------------
  |  Branch (1662:9): [True: 8.00k, False: 0]
  ------------------
 1663|  8.00k|      m_dateTimeFormat = std::string(base::consts::kDefaultDateTimeFormat);
 1664|  8.00k|    }
 1665|  8.00k|  }
 1666|  8.00k|}
_ZN2el4base9LogFormat16updateFormatSpecEv:
 1668|  8.00k|void LogFormat::updateFormatSpec(void) {
 1669|       |  // Do not use switch over strongly typed enums because Intel C++ compilers dont support them yet.
 1670|  8.00k|  if (m_level == Level::Debug) {
  ------------------
  |  Branch (1670:7): [True: 1.00k, False: 7.00k]
  ------------------
 1671|  1.00k|    base::utils::Str::replaceFirstWithEscape(m_format, base::consts::kSeverityLevelFormatSpecifier,
 1672|  1.00k|        base::consts::kDebugLevelLogValue);
 1673|  1.00k|    base::utils::Str::replaceFirstWithEscape(m_format, base::consts::kSeverityLevelShortFormatSpecifier,
 1674|  1.00k|        base::consts::kDebugLevelShortLogValue);
 1675|  7.00k|  } else if (m_level == Level::Info) {
  ------------------
  |  Branch (1675:14): [True: 1.00k, False: 6.00k]
  ------------------
 1676|  1.00k|    base::utils::Str::replaceFirstWithEscape(m_format, base::consts::kSeverityLevelFormatSpecifier,
 1677|  1.00k|        base::consts::kInfoLevelLogValue);
 1678|  1.00k|    base::utils::Str::replaceFirstWithEscape(m_format, base::consts::kSeverityLevelShortFormatSpecifier,
 1679|  1.00k|        base::consts::kInfoLevelShortLogValue);
 1680|  6.00k|  } else if (m_level == Level::Warning) {
  ------------------
  |  Branch (1680:14): [True: 1.00k, False: 5.00k]
  ------------------
 1681|  1.00k|    base::utils::Str::replaceFirstWithEscape(m_format, base::consts::kSeverityLevelFormatSpecifier,
 1682|  1.00k|        base::consts::kWarningLevelLogValue);
 1683|  1.00k|    base::utils::Str::replaceFirstWithEscape(m_format, base::consts::kSeverityLevelShortFormatSpecifier,
 1684|  1.00k|        base::consts::kWarningLevelShortLogValue);
 1685|  5.00k|  } else if (m_level == Level::Error) {
  ------------------
  |  Branch (1685:14): [True: 1.00k, False: 4.00k]
  ------------------
 1686|  1.00k|    base::utils::Str::replaceFirstWithEscape(m_format, base::consts::kSeverityLevelFormatSpecifier,
 1687|  1.00k|        base::consts::kErrorLevelLogValue);
 1688|  1.00k|    base::utils::Str::replaceFirstWithEscape(m_format, base::consts::kSeverityLevelShortFormatSpecifier,
 1689|  1.00k|        base::consts::kErrorLevelShortLogValue);
 1690|  4.00k|  } else if (m_level == Level::Fatal) {
  ------------------
  |  Branch (1690:14): [True: 1.00k, False: 3.00k]
  ------------------
 1691|  1.00k|    base::utils::Str::replaceFirstWithEscape(m_format, base::consts::kSeverityLevelFormatSpecifier,
 1692|  1.00k|        base::consts::kFatalLevelLogValue);
 1693|  1.00k|    base::utils::Str::replaceFirstWithEscape(m_format, base::consts::kSeverityLevelShortFormatSpecifier,
 1694|  1.00k|        base::consts::kFatalLevelShortLogValue);
 1695|  3.00k|  } else if (m_level == Level::Verbose) {
  ------------------
  |  Branch (1695:14): [True: 1.00k, False: 2.00k]
  ------------------
 1696|  1.00k|    base::utils::Str::replaceFirstWithEscape(m_format, base::consts::kSeverityLevelFormatSpecifier,
 1697|  1.00k|        base::consts::kVerboseLevelLogValue);
 1698|  1.00k|    base::utils::Str::replaceFirstWithEscape(m_format, base::consts::kSeverityLevelShortFormatSpecifier,
 1699|  1.00k|        base::consts::kVerboseLevelShortLogValue);
 1700|  2.00k|  } else if (m_level == Level::Trace) {
  ------------------
  |  Branch (1700:14): [True: 1.00k, False: 1.00k]
  ------------------
 1701|  1.00k|    base::utils::Str::replaceFirstWithEscape(m_format, base::consts::kSeverityLevelFormatSpecifier,
 1702|  1.00k|        base::consts::kTraceLevelLogValue);
 1703|  1.00k|    base::utils::Str::replaceFirstWithEscape(m_format, base::consts::kSeverityLevelShortFormatSpecifier,
 1704|  1.00k|        base::consts::kTraceLevelShortLogValue);
 1705|  1.00k|  }
 1706|  8.00k|  if (hasFlag(base::FormatFlags::User)) {
  ------------------
  |  Branch (1706:7): [True: 1.00k, False: 7.00k]
  ------------------
 1707|  1.00k|    base::utils::Str::replaceFirstWithEscape(m_format, base::consts::kCurrentUserFormatSpecifier,
 1708|  1.00k|        m_currentUser);
 1709|  1.00k|  }
 1710|  8.00k|  if (hasFlag(base::FormatFlags::Host)) {
  ------------------
  |  Branch (1710:7): [True: 1.00k, False: 7.00k]
  ------------------
 1711|  1.00k|    base::utils::Str::replaceFirstWithEscape(m_format, base::consts::kCurrentHostFormatSpecifier,
 1712|  1.00k|        m_currentHost);
 1713|  1.00k|  }
 1714|       |  // Ignore Level::Global and Level::Unknown
 1715|  8.00k|}
_ZN2el4base19TypedConfigurationsC2EPNS_14ConfigurationsEPNSt3__113unordered_mapINS4_12basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEENS4_10shared_ptrINS4_13basic_fstreamIcS8_EEEENS4_4hashISB_EENS4_8equal_toISB_EENS9_INS4_4pairIKSB_SF_EEEEEE:
 1720|  1.00k|    base::LogStreamsReferenceMap* logStreamsReference) {
 1721|  1.00k|  m_configurations = configurations;
 1722|  1.00k|  m_logStreamsReference = logStreamsReference;
 1723|  1.00k|  build(m_configurations);
 1724|  1.00k|}
_ZN2el4base19TypedConfigurations9logFormatENS_5LevelE:
 1748|  7.00k|const base::LogFormat& TypedConfigurations::logFormat(Level level) {
 1749|  7.00k|  return getConfigByRef<base::LogFormat>(level, &m_logFormatMap, "logFormat");
 1750|  7.00k|}
_ZN2el4base19TypedConfigurations5buildEPNS_14ConfigurationsE:
 1776|  1.00k|void TypedConfigurations::build(Configurations* configurations) {
 1777|  1.00k|  base::threading::ScopedLock scopedLock(lock());
 1778|  1.00k|  auto getBool = [] (std::string boolStr) -> bool {  // Pass by value for trimming
 1779|  1.00k|    base::utils::Str::trim(boolStr);
 1780|  1.00k|    return (boolStr == "TRUE" || boolStr == "true" || boolStr == "1");
 1781|  1.00k|  };
 1782|  1.00k|  setValue(Level::Global, base::FileStreamPtr(NULL), &m_fileStreamMap);
 1783|  1.00k|  std::vector<Configuration*> withFileSizeLimit;
 1784|  73.0k|  for (Configurations::const_iterator it = configurations->begin(); it != configurations->end(); ++it) {
  ------------------
  |  Branch (1784:69): [True: 72.0k, False: 1.00k]
  ------------------
 1785|  72.0k|    Configuration* conf = *it;
 1786|       |    // We cannot use switch on strong enums because Intel C++ dont support them yet
 1787|  72.0k|    if (conf->configurationType() == ConfigurationType::Enabled) {
  ------------------
  |  Branch (1787:9): [True: 8.00k, False: 64.0k]
  ------------------
 1788|  8.00k|      setValue(conf->level(), getBool(conf->value()), &m_enabledMap);
 1789|  64.0k|    } else if (conf->configurationType() == ConfigurationType::ToFile) {
  ------------------
  |  Branch (1789:16): [True: 8.00k, False: 56.0k]
  ------------------
 1790|  8.00k|      setValue(conf->level(), getBool(conf->value()), &m_toFileMap);
 1791|  56.0k|    } else if (conf->configurationType() == ConfigurationType::ToStandardOutput) {
  ------------------
  |  Branch (1791:16): [True: 8.00k, False: 48.0k]
  ------------------
 1792|  8.00k|      setValue(conf->level(), getBool(conf->value()), &m_toStandardOutputMap);
 1793|  48.0k|    } else if (conf->configurationType() == ConfigurationType::Filename) {
  ------------------
  |  Branch (1793:16): [True: 8.00k, False: 40.0k]
  ------------------
 1794|       |      // We do not yet configure filename but we will configure in another
 1795|       |      // loop. This is because if file cannot be created, we will force ToFile
 1796|       |      // to be false. Because configuring logger is not necessarily performance
 1797|       |      // sensative operation, we can live with another loop; (by the way this loop
 1798|       |      // is not very heavy either)
 1799|  40.0k|    } else if (conf->configurationType() == ConfigurationType::Format) {
  ------------------
  |  Branch (1799:16): [True: 8.00k, False: 32.0k]
  ------------------
 1800|  8.00k|      setValue(conf->level(), base::LogFormat(conf->level(),
 1801|  8.00k|                                              base::type::string_t(conf->value().begin(), conf->value().end())), &m_logFormatMap);
 1802|  32.0k|    } else if (conf->configurationType() == ConfigurationType::SubsecondPrecision) {
  ------------------
  |  Branch (1802:16): [True: 8.00k, False: 24.0k]
  ------------------
 1803|  8.00k|      setValue(Level::Global,
 1804|  8.00k|               base::SubsecondPrecision(static_cast<int>(getULong(conf->value()))), &m_subsecondPrecisionMap);
 1805|  24.0k|    } else if (conf->configurationType() == ConfigurationType::PerformanceTracking) {
  ------------------
  |  Branch (1805:16): [True: 8.00k, False: 16.0k]
  ------------------
 1806|  8.00k|      setValue(Level::Global, getBool(conf->value()), &m_performanceTrackingMap);
 1807|  16.0k|    } else if (conf->configurationType() == ConfigurationType::MaxLogFileSize) {
  ------------------
  |  Branch (1807:16): [True: 8.00k, False: 8.00k]
  ------------------
 1808|  8.00k|      auto v = getULong(conf->value());
 1809|  8.00k|      setValue(conf->level(), static_cast<std::size_t>(v), &m_maxLogFileSizeMap);
 1810|  8.00k|      if (v != 0) {
  ------------------
  |  Branch (1810:11): [True: 0, False: 8.00k]
  ------------------
 1811|      0|        withFileSizeLimit.push_back(conf);
 1812|      0|      }
 1813|  8.00k|    } else if (conf->configurationType() == ConfigurationType::LogFlushThreshold) {
  ------------------
  |  Branch (1813:16): [True: 8.00k, False: 0]
  ------------------
 1814|  8.00k|      setValue(conf->level(), static_cast<std::size_t>(getULong(conf->value())), &m_logFlushThresholdMap);
 1815|  8.00k|    }
 1816|  72.0k|  }
 1817|       |  // As mentioned earlier, we will now set filename configuration in separate loop to deal with non-existent files
 1818|  73.0k|  for (Configurations::const_iterator it = configurations->begin(); it != configurations->end(); ++it) {
  ------------------
  |  Branch (1818:69): [True: 72.0k, False: 1.00k]
  ------------------
 1819|  72.0k|    Configuration* conf = *it;
 1820|  72.0k|    if (conf->configurationType() == ConfigurationType::Filename) {
  ------------------
  |  Branch (1820:9): [True: 8.00k, False: 64.0k]
  ------------------
 1821|  8.00k|      insertFile(conf->level(), conf->value());
 1822|  8.00k|    }
 1823|  72.0k|  }
 1824|  1.00k|  for (std::vector<Configuration*>::iterator conf = withFileSizeLimit.begin();
 1825|  1.00k|       conf != withFileSizeLimit.end(); ++conf) {
  ------------------
  |  Branch (1825:8): [True: 0, False: 1.00k]
  ------------------
 1826|       |    // This is not unsafe as mutex is locked in currect scope
 1827|      0|    unsafeValidateFileRolling((*conf)->level(), base::defaultPreRollOutCallback);
 1828|      0|  }
 1829|  1.00k|}
_ZN2el4base19TypedConfigurations8getULongENSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEE:
 1831|  24.0k|unsigned long TypedConfigurations::getULong(std::string confVal) {
 1832|  24.0k|  bool valid = true;
 1833|  24.0k|  base::utils::Str::trim(confVal);
 1834|  24.0k|  valid = !confVal.empty() && std::find_if(confVal.begin(), confVal.end(),
  ------------------
  |  Branch (1834:11): [True: 24.0k, False: 0]
  |  Branch (1834:31): [True: 24.0k, False: 0]
  ------------------
 1835|  24.0k|  [](char c) {
 1836|  24.0k|    return !base::utils::Str::isDigit(c);
 1837|  24.0k|  }) == confVal.end();
 1838|  24.0k|  if (!valid) {
  ------------------
  |  Branch (1838:7): [True: 0, False: 24.0k]
  ------------------
 1839|      0|    valid = false;
 1840|      0|    ELPP_ASSERT(valid, "Configuration value not a valid integer [" << confVal << "]");
  ------------------
  |  |  178|      0|#    define ELPP_ASSERT(expr, msg) if (!(expr)) { \
  |  |  ------------------
  |  |  |  Branch (178:40): [True: 0, False: 0]
  |  |  ------------------
  |  |  179|      0|std::stringstream internalInfoStream; internalInfoStream << msg; \
  |  |  ------------------
  |  |  |  |  160|      0|#  define ELPP_INTERNAL_DEBUGGING_OUT_ERROR std::cerr
  |  |  ------------------
  |  |  180|      0|ELPP_INTERNAL_DEBUGGING_OUT_ERROR\
  |  |  181|      0|<< "ASSERTION FAILURE FROM EASYLOGGING++ (LINE: " \
  |  |  182|      0|<< __LINE__ << ") [" #expr << "] WITH MESSAGE \"" << ELPP_INTERNAL_DEBUGGING_MSG(internalInfoStream.str()) << "\"" \
  |  |  ------------------
  |  |  |  |  166|      0|#  define ELPP_INTERNAL_DEBUGGING_MSG(msg) msg
  |  |  ------------------
  |  |  183|      0|<< ELPP_INTERNAL_DEBUGGING_ENDL; }
  |  |  ------------------
  |  |  |  |  163|      0|#  define ELPP_INTERNAL_DEBUGGING_ENDL std::endl
  |  |  ------------------
  ------------------
 1841|      0|    return 0;
 1842|      0|  }
 1843|  24.0k|  return atol(confVal.c_str());
 1844|  24.0k|}
_ZN2el4base19TypedConfigurations10insertFileENS_5LevelERKNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEE:
 1885|  8.00k|void TypedConfigurations::insertFile(Level level, const std::string& fullFilename) {
 1886|  8.00k|  if (fullFilename.empty())
  ------------------
  |  Branch (1886:7): [True: 8.00k, False: 0]
  ------------------
 1887|  8.00k|    return;
 1888|      0|  std::string resolvedFilename = resolveFilename(fullFilename);
 1889|      0|  if (resolvedFilename.empty()) {
  ------------------
  |  Branch (1889:7): [True: 0, False: 0]
  ------------------
 1890|      0|    std::cerr << "Could not load empty file for logging, please re-check your configurations for level ["
 1891|      0|              << LevelHelper::convertToString(level) << "]";
 1892|      0|  }
 1893|      0|  std::string filePath = base::utils::File::extractPathFromFilename(resolvedFilename, base::consts::kFilePathSeperator);
 1894|      0|  if (filePath.size() < resolvedFilename.size()) {
  ------------------
  |  Branch (1894:7): [True: 0, False: 0]
  ------------------
 1895|      0|    base::utils::File::createPath(filePath);
 1896|      0|  }
 1897|      0|  auto create = [&](Level level) {
 1898|      0|    base::LogStreamsReferenceMap::iterator filestreamIter = m_logStreamsReference->find(resolvedFilename);
 1899|      0|    base::type::fstream_t* fs = nullptr;
 1900|      0|    if (filestreamIter == m_logStreamsReference->end()) {
 1901|       |      // We need a completely new stream, nothing to share with
 1902|      0|      fs = base::utils::File::newFileStream(resolvedFilename);
 1903|      0|      m_filenameMap.insert(std::make_pair(level, resolvedFilename));
 1904|      0|      m_fileStreamMap.insert(std::make_pair(level, base::FileStreamPtr(fs)));
 1905|      0|      m_logStreamsReference->insert(std::make_pair(resolvedFilename, base::FileStreamPtr(m_fileStreamMap.at(level))));
 1906|      0|    } else {
 1907|       |      // Woops! we have an existing one, share it!
 1908|      0|      m_filenameMap.insert(std::make_pair(level, filestreamIter->first));
 1909|      0|      m_fileStreamMap.insert(std::make_pair(level, base::FileStreamPtr(filestreamIter->second)));
 1910|      0|      fs = filestreamIter->second.get();
 1911|      0|    }
 1912|      0|    if (fs == nullptr) {
 1913|       |      // We display bad file error from newFileStream()
 1914|      0|      ELPP_INTERNAL_ERROR("Setting [TO_FILE] of ["
 1915|      0|                          << LevelHelper::convertToString(level) << "] to FALSE", false);
 1916|      0|      setValue(level, false, &m_toFileMap);
 1917|      0|    }
 1918|      0|  };
 1919|       |  // If we dont have file conf for any level, create it for Level::Global first
 1920|       |  // otherwise create for specified level
 1921|      0|  create(m_filenameMap.empty() && m_fileStreamMap.empty() ? Level::Global : level);
  ------------------
  |  Branch (1921:10): [True: 0, False: 0]
  |  Branch (1921:35): [True: 0, False: 0]
  ------------------
 1922|      0|}
_ZN2el4base17RegisteredLoggersC2ERKNSt3__110shared_ptrINS_10LogBuilderEEE:
 1991|  1.00k|  m_defaultLogBuilder(defaultLogBuilder) {
 1992|  1.00k|  m_defaultConfigurations.setToDefault();
 1993|  1.00k|}
_ZN2el4base17RegisteredLoggers3getERKNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEEb:
 1995|  2.00k|Logger* RegisteredLoggers::get(const std::string& id, bool forceCreation) {
 1996|  2.00k|  base::threading::ScopedLock scopedLock(lock());
 1997|  2.00k|  Logger* logger_ = base::utils::Registry<Logger, std::string>::get(id);
 1998|  2.00k|  if (logger_ == nullptr && forceCreation) {
  ------------------
  |  Branch (1998:7): [True: 1.00k, False: 1.00k]
  |  Branch (1998:29): [True: 1.00k, False: 0]
  ------------------
 1999|  1.00k|    bool validId = Logger::isValidId(id);
 2000|  1.00k|    if (!validId) {
  ------------------
  |  Branch (2000:9): [True: 0, False: 1.00k]
  ------------------
 2001|      0|      ELPP_ASSERT(validId, "Invalid logger ID [" << id << "]. Not registering this logger.");
  ------------------
  |  |  178|      0|#    define ELPP_ASSERT(expr, msg) if (!(expr)) { \
  |  |  ------------------
  |  |  |  Branch (178:40): [True: 0, False: 0]
  |  |  ------------------
  |  |  179|      0|std::stringstream internalInfoStream; internalInfoStream << msg; \
  |  |  ------------------
  |  |  |  |  160|      0|#  define ELPP_INTERNAL_DEBUGGING_OUT_ERROR std::cerr
  |  |  ------------------
  |  |  180|      0|ELPP_INTERNAL_DEBUGGING_OUT_ERROR\
  |  |  181|      0|<< "ASSERTION FAILURE FROM EASYLOGGING++ (LINE: " \
  |  |  182|      0|<< __LINE__ << ") [" #expr << "] WITH MESSAGE \"" << ELPP_INTERNAL_DEBUGGING_MSG(internalInfoStream.str()) << "\"" \
  |  |  ------------------
  |  |  |  |  166|      0|#  define ELPP_INTERNAL_DEBUGGING_MSG(msg) msg
  |  |  ------------------
  |  |  183|      0|<< ELPP_INTERNAL_DEBUGGING_ENDL; }
  |  |  ------------------
  |  |  |  |  163|      0|#  define ELPP_INTERNAL_DEBUGGING_ENDL std::endl
  |  |  ------------------
  ------------------
 2002|      0|      return nullptr;
 2003|      0|    }
 2004|  1.00k|    logger_ = new Logger(id, m_defaultConfigurations, &m_logStreamsReference);
 2005|  1.00k|    logger_->m_logBuilder = m_defaultLogBuilder;
 2006|  1.00k|    registerNew(id, logger_);
 2007|  1.00k|    LoggerRegistrationCallback* callback = nullptr;
 2008|  1.00k|    for (const std::pair<std::string, base::type::LoggerRegistrationCallbackPtr>& h
 2009|  1.00k|         : m_loggerRegistrationCallbacks) {
  ------------------
  |  Branch (2009:10): [True: 0, False: 1.00k]
  ------------------
 2010|      0|      callback = h.second.get();
 2011|      0|      if (callback != nullptr && callback->enabled()) {
  ------------------
  |  Branch (2011:11): [True: 0, False: 0]
  |  Branch (2011:34): [True: 0, False: 0]
  ------------------
 2012|      0|        callback->handle(logger_);
 2013|      0|      }
 2014|      0|    }
 2015|  1.00k|  }
 2016|  2.00k|  return logger_;
 2017|  2.00k|}
_ZN2el4base17RegisteredLoggers14unsafeFlushAllEv:
 2032|  1.00k|void RegisteredLoggers::unsafeFlushAll(void) {
 2033|  1.00k|  ELPP_INTERNAL_INFO(1, "Flushing all log files");
 2034|  1.00k|  for (base::LogStreamsReferenceMap::iterator it = m_logStreamsReference.begin();
 2035|  1.00k|       it != m_logStreamsReference.end(); ++it) {
  ------------------
  |  Branch (2035:8): [True: 0, False: 1.00k]
  ------------------
 2036|      0|    if (it->second.get() == nullptr) continue;
  ------------------
  |  Branch (2036:9): [True: 0, False: 0]
  ------------------
 2037|      0|    it->second->flush();
 2038|      0|  }
 2039|  1.00k|}
_ZN2el4base9VRegistryC2EtPj:
 2043|  1.00k|VRegistry::VRegistry(base::type::VerboseLevel level, base::type::EnumType* pFlags) : m_level(level), m_pFlags(pFlags) {
 2044|  1.00k|}
_ZN2el4base9VRegistry16priority_allowedEiRKNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEE:
 2222|  14.4k|bool VRegistry::priority_allowed(const int pri, const std::string &category) {
 2223|  14.4k|  base::threading::ScopedLock scopedLock(lock());
 2224|  14.4k|  const std::map<std::string, int>::const_iterator it = m_cached_allowed_categories.find(category);
 2225|  14.4k|  if (it != m_cached_allowed_categories.end())
  ------------------
  |  Branch (2225:7): [True: 0, False: 14.4k]
  ------------------
 2226|      0|    return pri <= it->second;
 2227|  14.4k|  if (m_categories.empty()) {
  ------------------
  |  Branch (2227:7): [True: 14.4k, False: 0]
  ------------------
 2228|  14.4k|    return false;
 2229|  14.4k|  } else {
 2230|      0|    std::vector<std::pair<std::string, Level>>::const_reverse_iterator it = m_categories.rbegin();
 2231|      0|    for (; it != m_categories.rend(); ++it) {
  ------------------
  |  Branch (2231:12): [True: 0, False: 0]
  ------------------
 2232|      0|      if (base::utils::Str::wildCardMatch(category.c_str(), it->first.c_str())) {
  ------------------
  |  Branch (2232:11): [True: 0, False: 0]
  ------------------
 2233|      0|        const int p = priority(it->second);
 2234|      0|        m_cached_allowed_categories.insert(std::make_pair(category, p));
 2235|      0|        return pri <= p;
 2236|      0|      }
 2237|      0|    }
 2238|      0|    m_cached_allowed_categories.insert(std::make_pair(category, -1));
 2239|      0|    return false;
 2240|      0|  }
 2241|  14.4k|}
_ZN2el4base7Storage7getELPPEv:
 2283|  14.4k|{
 2284|  14.4k|  if (!el::base::elStorage)
  ------------------
  |  Branch (2284:7): [True: 999, False: 13.4k]
  ------------------
 2285|    999|    el::base::elStorage = new el::base::Storage(el::LogBuilderPtr(new el::base::DefaultLogBuilder()));
 2286|  14.4k|  return el::base::elStorage;
 2287|  14.4k|}
_ZN2el4base7StorageC2ERKNSt3__110shared_ptrINS_10LogBuilderEEE:
 2294|  1.00k|  m_registeredHitCounters(new base::RegisteredHitCounters()),
 2295|  1.00k|  m_registeredLoggers(new base::RegisteredLoggers(defaultLogBuilder)),
 2296|  1.00k|  m_flags(ELPP_DEFAULT_LOGGING_FLAGS),
  ------------------
  |  | 2279|  1.00k|#   define ELPP_DEFAULT_LOGGING_FLAGS 0x0
  ------------------
 2297|  1.00k|  m_vRegistry(new base::VRegistry(0, &m_flags)),
 2298|       |
 2299|       |#if ELPP_ASYNC_LOGGING
 2300|       |  m_asyncLogQueue(new base::AsyncLogQueue()),
 2301|       |  m_asyncDispatchWorker(asyncDispatchWorker),
 2302|       |#endif  // ELPP_ASYNC_LOGGING
 2303|       |
 2304|  1.00k|  m_preRollOutCallback(base::defaultPreRollOutCallback) {
 2305|       |  // Register default logger
 2306|  1.00k|  m_registeredLoggers->get(std::string(base::consts::kDefaultLoggerId));
 2307|       |  // We register default logger anyway (worse case it's not going to register) just in case
 2308|  1.00k|  m_registeredLoggers->get("default");
 2309|       |
 2310|       |#if defined(ELPP_FEATURE_ALL) || defined(ELPP_FEATURE_PERFORMANCE_TRACKING)
 2311|       |  // Register performance logger and reconfigure format
 2312|       |  Logger* performanceLogger = m_registeredLoggers->get(std::string(base::consts::kPerformanceLoggerId));
 2313|       |  m_registeredLoggers->get("performance");
 2314|       |  performanceLogger->configurations()->setGlobally(ConfigurationType::Format, std::string("%datetime %level %msg"));
 2315|       |  performanceLogger->reconfigure();
 2316|       |#endif // defined(ELPP_FEATURE_ALL) || defined(ELPP_FEATURE_PERFORMANCE_TRACKING)
 2317|       |
 2318|       |#if defined(ELPP_SYSLOG)
 2319|       |  // Register syslog logger and reconfigure format
 2320|       |  Logger* sysLogLogger = m_registeredLoggers->get(std::string(base::consts::kSysLogLoggerId));
 2321|       |  sysLogLogger->configurations()->setGlobally(ConfigurationType::Format, std::string("%level: %msg"));
 2322|       |  sysLogLogger->reconfigure();
 2323|       |#endif //  defined(ELPP_SYSLOG)
 2324|  1.00k|  addFlag(LoggingFlag::AllowVerboseIfModuleNotSpecified);
 2325|  1.00k|  addFlag(LoggingFlag::CreateLoggerAutomatically);
 2326|       |#if ELPP_ASYNC_LOGGING
 2327|       |  installLogDispatchCallback<base::AsyncLogDispatchCallback>(std::string("AsyncLogDispatchCallback"));
 2328|       |#else
 2329|  1.00k|  installLogDispatchCallback<base::DefaultLogDispatchCallback>(std::string("DefaultLogDispatchCallback"));
 2330|  1.00k|#endif  // ELPP_ASYNC_LOGGING
 2331|       |#if defined(ELPP_FEATURE_ALL) || defined(ELPP_FEATURE_PERFORMANCE_TRACKING)
 2332|       |  installPerformanceTrackingCallback<base::DefaultPerformanceTrackingCallback>
 2333|       |  (std::string("DefaultPerformanceTrackingCallback"));
 2334|       |#endif // defined(ELPP_FEATURE_ALL) || defined(ELPP_FEATURE_PERFORMANCE_TRACKING)
 2335|  1.00k|  ELPP_INTERNAL_INFO(1, "Easylogging++ has been initialized");
 2336|       |#if ELPP_ASYNC_LOGGING
 2337|       |  m_asyncDispatchWorker->start();
 2338|       |#endif  // ELPP_ASYNC_LOGGING
 2339|  1.00k|}
_ZN2el4base7StorageD2Ev:
 2341|  1.00k|Storage::~Storage(void) {
 2342|  1.00k|  ELPP_INTERNAL_INFO(4, "Destroying storage");
 2343|       |#if ELPP_ASYNC_LOGGING
 2344|       |  ELPP_INTERNAL_INFO(5, "Replacing log dispatch callback to synchronous");
 2345|       |  uninstallLogDispatchCallback<base::AsyncLogDispatchCallback>(std::string("AsyncLogDispatchCallback"));
 2346|       |  installLogDispatchCallback<base::DefaultLogDispatchCallback>(std::string("DefaultLogDispatchCallback"));
 2347|       |  ELPP_INTERNAL_INFO(5, "Destroying asyncDispatchWorker");
 2348|       |  base::utils::safeDelete(m_asyncDispatchWorker);
 2349|       |  ELPP_INTERNAL_INFO(5, "Destroying asyncLogQueue");
 2350|       |  base::utils::safeDelete(m_asyncLogQueue);
 2351|       |#endif  // ELPP_ASYNC_LOGGING
 2352|  1.00k|  ELPP_INTERNAL_INFO(5, "Destroying registeredHitCounters");
 2353|  1.00k|  base::utils::safeDelete(m_registeredHitCounters);
 2354|  1.00k|  ELPP_INTERNAL_INFO(5, "Destroying registeredLoggers");
 2355|  1.00k|  base::utils::safeDelete(m_registeredLoggers);
 2356|  1.00k|  ELPP_INTERNAL_INFO(5, "Destroying vRegistry");
 2357|  1.00k|  base::utils::safeDelete(m_vRegistry);
 2358|  1.00k|}
_ZN2el7Loggers7allowedENS_5LevelEPKc:
 3361|  14.4k|{
 3362|  14.4k|  const int pri = base::priority(level);
 3363|  14.4k|  if (pri > base::s_lowest_priority)
  ------------------
  |  Branch (3363:7): [True: 0, False: 14.4k]
  ------------------
 3364|      0|    return false;
 3365|  14.4k|  return ELPP->vRegistry()->priority_allowed(pri, std::string{cat});
  ------------------
  |  | 2792|  14.4k|#define ELPP el::base::Storage::getELPP()
  ------------------
 3366|  14.4k|}
easylogging++.cc:_ZZN2el4base9LogFormat15parseFromFormatERKNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEEENK3$_0clEPKcNS0_11FormatFlagsE:
 1597|   112k|  auto conditionalAddFlag = [&](const base::type::char_t* specifier, base::FormatFlags flag) {
 1598|   112k|    std::size_t foundAt = base::type::string_t::npos;
 1599|   143k|    while ((foundAt = formatCopy.find(specifier, foundAt + 1)) != base::type::string_t::npos) {
  ------------------
  |  Branch (1599:12): [True: 31.0k, False: 112k]
  ------------------
 1600|  31.0k|      if (foundAt > 0 && formatCopy[foundAt - 1] == base::consts::kFormatSpecifierChar) {
  ------------------
  |  Branch (1600:11): [True: 31.0k, False: 0]
  |  Branch (1600:26): [True: 0, False: 31.0k]
  ------------------
 1601|      0|        if (hasFlag(flag)) {
  ------------------
  |  Branch (1601:13): [True: 0, False: 0]
  ------------------
 1602|       |          // If we already have flag we remove the escape chars so that '%%' is turned to '%'
 1603|       |          // even after specifier resolution - this is because we only replaceFirst specifier
 1604|      0|          formatCopy.erase(foundAt - 1, 1);
 1605|      0|          ++foundAt;
 1606|      0|        }
 1607|  31.0k|      } else {
 1608|  31.0k|        if (!hasFlag(flag)) addFlag(flag);
  ------------------
  |  Branch (1608:13): [True: 31.0k, False: 0]
  ------------------
 1609|  31.0k|      }
 1610|  31.0k|    }
 1611|   112k|  };
easylogging++.cc:_ZZN2el4base19TypedConfigurations5buildEPNS_14ConfigurationsEENK3$_0clENSt3__112basic_stringIcNS5_11char_traitsIcEENS5_9allocatorIcEEEE:
 1778|  32.0k|  auto getBool = [] (std::string boolStr) -> bool {  // Pass by value for trimming
 1779|  32.0k|    base::utils::Str::trim(boolStr);
 1780|  32.0k|    return (boolStr == "TRUE" || boolStr == "true" || boolStr == "1");
  ------------------
  |  Branch (1780:13): [True: 0, False: 32.0k]
  |  Branch (1780:34): [True: 32.0k, False: 0]
  |  Branch (1780:55): [True: 0, False: 0]
  ------------------
 1781|  32.0k|  };
easylogging++.cc:_ZN2el4baseL8priorityENS_5LevelE:
 2128|  14.4k|static int priority(Level level) {
 2129|  14.4k|  if (level == Level::Fatal) return 0;
  ------------------
  |  Branch (2129:7): [True: 0, False: 14.4k]
  ------------------
 2130|  14.4k|  if (level == Level::Error) return 1;
  ------------------
  |  Branch (2130:7): [True: 439, False: 13.9k]
  ------------------
 2131|  13.9k|  if (level == Level::Warning) return 2;
  ------------------
  |  Branch (2131:7): [True: 142, False: 13.8k]
  ------------------
 2132|  13.8k|  if (level == Level::Info) return 3;
  ------------------
  |  Branch (2132:7): [True: 3.68k, False: 10.1k]
  ------------------
 2133|  10.1k|  if (level == Level::Debug) return 4;
  ------------------
  |  Branch (2133:7): [True: 9.15k, False: 1.00k]
  ------------------
 2134|  1.00k|  if (level == Level::Verbose) return 5;
  ------------------
  |  Branch (2134:7): [True: 0, False: 1.00k]
  ------------------
 2135|  1.00k|  if (level == Level::Trace) return 6;
  ------------------
  |  Branch (2135:7): [True: 1.00k, False: 0]
  ------------------
 2136|      0|  return 7;
 2137|  1.00k|}
_ZN2el4base10EnsureELPPC2Ev:
 2288|      2|static struct EnsureELPP { EnsureELPP() { el::base::Storage::getELPP(); } } ensureELPP;
easylogging++.cc:_ZZN2el14Configurations11setGloballyENS_17ConfigurationTypeERKNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEEbENK3$_0clEv:
  642|  63.0k|  LevelHelper::forEachLevel(&lIndex, [&](void) -> bool {
  643|  63.0k|    set(LevelHelper::castFromInt(lIndex), configurationType, value);
  644|  63.0k|    return false;  // Do not break lambda function yet as we need to set all levels regardless
  645|  63.0k|  });
easylogging++.cc:_ZZN2el14Configurations17unsafeSetGloballyENS_17ConfigurationTypeERKNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEEbENK3$_0clEv:
  654|   252k|  LevelHelper::forEachLevel(&lIndex, [&](void) -> bool  {
  655|   252k|    unsafeSet(LevelHelper::castFromInt(lIndex), configurationType, value);
  656|   252k|    return false;  // Do not break lambda function yet as we need to set all levels regardless
  657|   252k|  });
easylogging++.cc:_ZZN2el6Logger18initUnflushedCountEvENK3$_0clEv:
  805|  14.0k|  LevelHelper::forEachLevel(&lIndex, [&](void) -> bool {
  806|  14.0k|    m_unflushedCount.insert(std::make_pair(LevelHelper::castFromInt(lIndex), 0));
  807|  14.0k|    return false;
  808|  14.0k|  });
easylogging++.cc:_ZZNK2el6Logger23resolveLoggerFormatSpecEvENK3$_0clEv:
  813|  7.00k|  LevelHelper::forEachLevel(&lIndex, [&](void) -> bool {
  814|  7.00k|    base::LogFormat* logFormat =
  815|  7.00k|    const_cast<base::LogFormat*>(&m_typedConfigurations->logFormat(LevelHelper::castFromInt(lIndex)));
  816|  7.00k|    base::utils::Str::replaceFirstWithEscape(logFormat->m_format, base::consts::kLoggerIdFormatSpecifier, m_id);
  817|  7.00k|    return false;
  818|  7.00k|  });
easylogging++.cc:_ZZN2el4base5utils3Str5ltrimERNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEENK3$_0clEc:
  989|  56.0k|  str.erase(str.begin(), std::find_if(str.begin(), str.end(), [](char c) {
  990|  56.0k|    return !std::isspace(c);
  991|  56.0k|  } ));
easylogging++.cc:_ZZN2el4base5utils3Str5rtrimERNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEENK3$_0clEc:
  996|  56.0k|  str.erase(std::find_if(str.rbegin(), str.rend(), [](char c) {
  997|  56.0k|    return !std::isspace(c);
  998|  56.0k|  }).base(), str.end());
easylogging++.cc:_ZZN2el4base19TypedConfigurations8getULongENSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEEENK3$_0clEc:
 1835|  24.0k|  [](char c) {
 1836|  24.0k|    return !base::utils::Str::isDigit(c);
 1837|  24.0k|  }) == confVal.end();

_ZN2el4base6NoCopyC2Ev:
  571|  3.00k|  NoCopy(void) {}
_ZNKSt3__14hashIN2el5LevelEEclERKS2_:
  624|   100k|  std::size_t operator()(const el::Level& l) const {
  625|   100k|    return hash<el::base::type::EnumType> {}(static_cast<el::base::type::EnumType>(l));
  626|   100k|  }
_ZN2el11LevelHelper11castFromIntEj:
  642|   336k|  static Level castFromInt(base::type::EnumType l) {
  643|   336k|    return static_cast<Level>(l);
  644|   336k|  }
_ZN2el4base18SubsecondPrecisionC2Ei:
  870|  8.00k|  explicit SubsecondPrecision(int width) {
  871|  8.00k|    init(width);
  872|  8.00k|  }
_ZN2el4base18SubsecondPrecisioneqERKS1_:
  873|  7.00k|  bool operator==(const SubsecondPrecision& ssPrec) {
  874|  7.00k|    return m_width == ssPrec.m_width && m_offset == ssPrec.m_offset;
  ------------------
  |  Branch (874:12): [True: 7.00k, False: 0]
  |  Branch (874:41): [True: 7.00k, False: 0]
  ------------------
  875|  7.00k|  }
_ZN2el4base9threading10ThreadSafe4lockEv:
 1037|   175k|  virtual inline base::threading::Mutex& lock(void) ELPP_FINAL { return m_mutex; }
_ZN2el4base9threading10ThreadSafeC2Ev:
 1039|  9.00k|  ThreadSafe(void) {}
_ZN2el4base9threading10ThreadSafeD2Ev:
 1040|  9.00k|  virtual ~ThreadSafe(void) {}
_ZN2el4base5utils3Str7isDigitEc:
 1107|  24.0k|  static inline bool isDigit(char c) {
 1108|  24.0k|    return c >= '0' && c <= '9';
  ------------------
  |  Branch (1108:12): [True: 24.0k, False: 0]
  |  Branch (1108:24): [True: 24.0k, False: 0]
  ------------------
 1109|  24.0k|  }
_ZN2el4base5utils15CommandLineArgsC2Ev:
 1251|  1.00k|  CommandLineArgs(void) {
 1252|  1.00k|    setArgs(0, static_cast<char**>(nullptr));
 1253|  1.00k|  }
_ZN2el4base5utils15CommandLineArgsD2Ev:
 1260|  1.00k|  virtual ~CommandLineArgs(void) {}
_ZN2el8LoggableD2Ev:
 1603|   169k|  virtual ~Loggable(void) {}
_ZN2el4base9LogFormatD2Ev:
 1620|  24.0k|  virtual ~LogFormat(void) {}
_ZNK2el4base9LogFormat7hasFlagENS0_11FormatFlagsE:
 1647|  63.0k|  inline bool hasFlag(base::FormatFlags flag) const {
 1648|  63.0k|    return base::utils::hasFlag(flag, m_flags);
 1649|  63.0k|  }
_ZN2el4base9LogFormat7addFlagENS0_11FormatFlagsE:
 1664|  39.0k|  inline void addFlag(base::FormatFlags flag) {
 1665|  39.0k|    base::utils::addFlag(flag, &m_flags);
 1666|  39.0k|  }
_ZN2el13ConfigurationD2Ev:
 1716|   144k|  virtual ~Configuration(void) {
 1717|   144k|  }
_ZNK2el13Configuration5levelEv:
 1723|  14.9M|  inline Level level(void) const {
 1724|  14.9M|    return m_level;
 1725|  14.9M|  }
_ZNK2el13Configuration17configurationTypeEv:
 1728|  2.38M|  inline ConfigurationType configurationType(void) const {
 1729|  2.38M|    return m_configurationType;
 1730|  2.38M|  }
_ZNK2el13Configuration5valueEv:
 1733|   152k|  inline const std::string& value(void) const {
 1734|   152k|    return m_value;
 1735|   152k|  }
_ZN2el13Configuration8setValueERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE:
 1740|   257k|  inline void setValue(const std::string& value) {
 1741|   257k|    m_value = value;
 1742|   257k|  }
_ZN2el14ConfigurationsD2Ev:
 1781|  2.00k|  virtual ~Configurations(void) {
 1782|  2.00k|  }
_ZN2el4base19TypedConfigurationsD2Ev:
 1950|  1.00k|  virtual ~TypedConfigurations(void) {
 1951|  1.00k|  }
_ZN2el10LogBuilderC2Ev:
 2237|  1.00k|  LogBuilder() : m_termSupportsColor(base::utils::OS::termSupportsColor()) {}
_ZN2el10LogBuilderD2Ev:
 2238|  1.00k|  virtual ~LogBuilder(void) {
 2239|  1.00k|    ELPP_INTERNAL_INFO(3, "Destroying log builder...")
 2240|  1.00k|  }
_ZN2el6LoggerD2Ev:
 2259|  1.00k|  virtual ~Logger(void) {
 2260|  1.00k|    base::utils::safeDelete(m_typedConfigurations);
 2261|  1.00k|  }
_ZN2el4base17RegisteredLoggersD2Ev:
 2390|  1.00k|  virtual ~RegisteredLoggers(void) {
 2391|  1.00k|    unsafeFlushAll();
 2392|  1.00k|  }
_ZNK2el4base7Storage9vRegistryEv:
 2645|  14.4k|  inline base::VRegistry* vRegistry(void) const {
 2646|  14.4k|    return m_vRegistry;
 2647|  14.4k|  }
_ZN2el4base7Storage7addFlagENS_11LoggingFlagE:
 2659|  2.00k|  inline void addFlag(LoggingFlag flag) {
 2660|  2.00k|    base::utils::addFlag(flag, &m_flags);
 2661|  2.00k|  }
_ZN2el4base5utils16RegistryWithPredINS_13ConfigurationENS3_9PredicateEE3getINS_5LevelENS_17ConfigurationTypeEEEPS3_RKT_T0_:
 1554|   401k|  T_Ptr* get(const T& arg1, const T2 arg2) {
 1555|   401k|    iterator iter = std::find_if(this->list().begin(), this->list().end(), Pred(arg1, arg2));
 1556|   401k|    if (iter != this->list().end() && *iter != nullptr) {
  ------------------
  |  Branch (1556:9): [True: 257k, False: 144k]
  |  Branch (1556:9): [True: 257k, False: 144k]
  |  Branch (1556:39): [True: 257k, False: 0]
  ------------------
 1557|   257k|      return *iter;
 1558|   257k|    }
 1559|   144k|    return nullptr;
 1560|   401k|  }
_ZN2el4base5utils16RegistryWithPredINS_13ConfigurationENS3_9PredicateEE13unregisterAllEv:
 1523|  2.00k|  virtual void unregisterAll(void) ELPP_FINAL {
 1524|  2.00k|    if (!this->empty()) {
  ------------------
  |  Branch (1524:9): [True: 2.00k, False: 0]
  ------------------
 1525|   144k|      for (auto&& curr : this->list()) {
  ------------------
  |  Branch (1525:24): [True: 144k, False: 2.00k]
  ------------------
 1526|   144k|        base::utils::safeDelete(curr);
 1527|   144k|      }
 1528|  2.00k|      this->list().clear();
 1529|  2.00k|    }
 1530|  2.00k|  }
_ZN2el4base5utils8RegistryINS_6LoggerENSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEE10unregisterERKSA_:
 1455|  1.00k|  void unregister(const T_Key& uniqKey) {
 1456|  1.00k|    T_Ptr* existing = get(uniqKey);
 1457|  1.00k|    if (existing != nullptr) {
  ------------------
  |  Branch (1457:9): [True: 0, False: 1.00k]
  ------------------
 1458|      0|      this->list().erase(uniqKey);
 1459|      0|      base::utils::safeDelete(existing);
 1460|      0|    }
 1461|  1.00k|  }
_ZN2el4base5utils8RegistryINS_6LoggerENSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEE3getERKSA_:
 1464|  3.00k|  T_Ptr* get(const T_Key& uniqKey) {
 1465|  3.00k|    iterator it = this->list().find(uniqKey);
 1466|  3.00k|    return it == this->list().end()
  ------------------
  |  Branch (1466:12): [True: 2.00k, False: 1.00k]
  ------------------
 1467|  3.00k|           ? nullptr
 1468|  3.00k|           : it->second;
 1469|  3.00k|  }
_ZN2el4base5utils16AbstractRegistryINS_13ConfigurationENSt3__16vectorIPS3_NS4_9allocatorIS6_EEEEE5beginEv:
 1348|  2.00k|  virtual inline iterator begin(void) ELPP_FINAL {
 1349|  2.00k|    return m_list.begin();
 1350|  2.00k|  }
_ZN2el4base5utils16AbstractRegistryINS_13ConfigurationENSt3__16vectorIPS3_NS4_9allocatorIS6_EEEEE3endEv:
 1353|   146k|  virtual inline iterator end(void) ELPP_FINAL {
 1354|   146k|    return m_list.end();
 1355|   146k|  }
_ZNK2el4base5utils16AbstractRegistryINS_13ConfigurationENSt3__16vectorIPS3_NS4_9allocatorIS6_EEEEE5emptyEv:
 1369|  2.00k|  virtual inline bool empty(void) const ELPP_FINAL {
 1370|  2.00k|    return m_list.empty();
 1371|  2.00k|  }
_ZNK2el4base5utils16AbstractRegistryINS_13ConfigurationENSt3__16vectorIPS3_NS4_9allocatorIS6_EEEEE4sizeEv:
 1374|  2.00k|  virtual inline std::size_t size(void) const ELPP_FINAL {
 1375|  2.00k|    return m_list.size();
 1376|  2.00k|  }
_ZN2el4base5utils16AbstractRegistryINS_13ConfigurationENSt3__16vectorIPS3_NS4_9allocatorIS6_EEEEE4listEv:
 1379|  1.35M|  virtual inline Container& list(void) ELPP_FINAL {
 1380|  1.35M|    return m_list;
 1381|  1.35M|  }
_ZN2el4base5utils16RegistryWithPredINS_13ConfigurationENS3_9PredicateEE11registerNewEPS3_:
 1547|   144k|  virtual inline void registerNew(T_Ptr* ptr) ELPP_FINAL {
 1548|   144k|    this->list().push_back(ptr);
 1549|   144k|  }
_ZNK2el4base5utils16AbstractRegistryINS_6LoggerENSt3__113unordered_mapINS4_12basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEPS3_NS4_4hashISB_EENS4_8equal_toISB_EENS9_INS4_4pairIKSB_SC_EEEEEEE5emptyEv:
 1369|  1.00k|  virtual inline bool empty(void) const ELPP_FINAL {
 1370|  1.00k|    return m_list.empty();
 1371|  1.00k|  }
_ZN2el4base5utils16AbstractRegistryINS_6LoggerENSt3__113unordered_mapINS4_12basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEPS3_NS4_4hashISB_EENS4_8equal_toISB_EENS9_INS4_4pairIKSB_SC_EEEEEEE4listEv:
 1379|  9.00k|  virtual inline Container& list(void) ELPP_FINAL {
 1380|  9.00k|    return m_list;
 1381|  9.00k|  }
_ZN2el4base5utils8RegistryINS_6LoggerENSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEE13unregisterAllEv:
 1439|  1.00k|  virtual void unregisterAll(void) ELPP_FINAL {
 1440|  1.00k|    if (!this->empty()) {
  ------------------
  |  Branch (1440:9): [True: 1.00k, False: 0]
  ------------------
 1441|  1.00k|      for (auto&& curr : this->list()) {
  ------------------
  |  Branch (1441:24): [True: 1.00k, False: 1.00k]
  ------------------
 1442|  1.00k|        base::utils::safeDelete(curr.second);
 1443|  1.00k|      }
 1444|  1.00k|      this->list().clear();
 1445|  1.00k|    }
 1446|  1.00k|  }
_ZN2el4base5utils8RegistryINS_6LoggerENSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEE11registerNewERKSA_PS3_:
 1449|  1.00k|  virtual void registerNew(const T_Key& uniqKey, T_Ptr* ptr) ELPP_FINAL {
 1450|  1.00k|    unregister(uniqKey);
 1451|  1.00k|    this->list().insert(std::make_pair(uniqKey, ptr));
 1452|  1.00k|  }
easylogging++.cc:_ZN2el4base5utilsL7addFlagINS0_11FormatFlagsEEEvT_Pj:
  912|  39.0k|static inline void addFlag(Enum e, base::type::EnumType* flag) {
  913|  39.0k|  *flag = base::utils::bitwise::Or<Enum>(e, *flag);
  914|  39.0k|}
easylogging++.cc:_ZN2el4base5utils7bitwiseL2OrINS0_11FormatFlagsEEEjT_j:
  907|  39.0k|static inline base::type::EnumType Or(Enum e, base::type::EnumType flag) {
  908|  39.0k|  return static_cast<base::type::EnumType>(flag) | static_cast<base::type::EnumType>(e);
  909|  39.0k|}
easylogging++.cc:_ZN2el4base5utilsL7hasFlagINS0_11FormatFlagsEEEbT_j:
  920|  63.0k|static inline bool hasFlag(Enum e, base::type::EnumType flag) {
  921|  63.0k|  return base::utils::bitwise::And<Enum>(e, flag) > 0x0;
  922|  63.0k|}
easylogging++.cc:_ZN2el4base5utils7bitwiseL3AndINS0_11FormatFlagsEEEjT_j:
  899|  63.0k|static inline base::type::EnumType And(Enum e, base::type::EnumType flag) {
  900|  63.0k|  return static_cast<base::type::EnumType>(flag) & static_cast<base::type::EnumType>(e);
  901|  63.0k|}
easylogging++.cc:_ZN2el4base5utilsL10safeDeleteINS_6LoggerEEENSt3__19enable_ifIXsr3std10is_pointerIPT_EE5valueEvE4typeERS7_:
  889|  1.00k|safeDelete(T*& pointer) {
  890|  1.00k|  if (pointer == nullptr)
  ------------------
  |  Branch (890:7): [True: 0, False: 1.00k]
  ------------------
  891|      0|    return;
  892|  1.00k|  delete pointer;
  893|  1.00k|  pointer = nullptr;
  894|  1.00k|}
_ZN2el4base5utils16RegistryWithPredINS0_10HitCounterENS3_9PredicateEEC2Ev:
 1489|  1.00k|  RegistryWithPred(void) {
 1490|  1.00k|  }
_ZN2el4base5utils16AbstractRegistryINS0_10HitCounterENSt3__16vectorIPS3_NS4_9allocatorIS6_EEEEEC2Ev:
 1299|  1.00k|  AbstractRegistry(void) {}
_ZN2el4base5utils16AbstractRegistryINS0_10HitCounterENSt3__16vectorIPS3_NS4_9allocatorIS6_EEEEED2Ev:
 1344|  1.00k|  virtual ~AbstractRegistry(void) {
 1345|  1.00k|  }
_ZN2el4base5utils16RegistryWithPredINS0_10HitCounterENS3_9PredicateEED2Ev:
 1492|  1.00k|  virtual ~RegistryWithPred(void) {
 1493|  1.00k|    unregisterAll();
 1494|  1.00k|  }
_ZNK2el4base5utils16AbstractRegistryINS0_10HitCounterENSt3__16vectorIPS3_NS4_9allocatorIS6_EEEEE5emptyEv:
 1369|  1.00k|  virtual inline bool empty(void) const ELPP_FINAL {
 1370|  1.00k|    return m_list.empty();
 1371|  1.00k|  }
_ZN2el4base5utils16RegistryWithPredINS0_10HitCounterENS3_9PredicateEE13unregisterAllEv:
 1523|  1.00k|  virtual void unregisterAll(void) ELPP_FINAL {
 1524|  1.00k|    if (!this->empty()) {
  ------------------
  |  Branch (1524:9): [True: 0, False: 1.00k]
  ------------------
 1525|      0|      for (auto&& curr : this->list()) {
  ------------------
  |  Branch (1525:24): [True: 0, False: 0]
  ------------------
 1526|      0|        base::utils::safeDelete(curr);
 1527|      0|      }
 1528|      0|      this->list().clear();
 1529|      0|    }
 1530|  1.00k|  }
easylogging++.cc:_ZN2el4base5utilsL7addFlagINS_11LoggingFlagEEEvT_Pj:
  912|  2.00k|static inline void addFlag(Enum e, base::type::EnumType* flag) {
  913|  2.00k|  *flag = base::utils::bitwise::Or<Enum>(e, *flag);
  914|  2.00k|}
easylogging++.cc:_ZN2el4base5utils7bitwiseL2OrINS_11LoggingFlagEEEjT_j:
  907|  2.00k|static inline base::type::EnumType Or(Enum e, base::type::EnumType flag) {
  908|  2.00k|  return static_cast<base::type::EnumType>(flag) | static_cast<base::type::EnumType>(e);
  909|  2.00k|}
_ZN2el4base5utils16RegistryWithPredINS_13ConfigurationENS3_9PredicateEED2Ev:
 1492|  2.00k|  virtual ~RegistryWithPred(void) {
 1493|  2.00k|    unregisterAll();
 1494|  2.00k|  }
_ZN2el4base5utils16AbstractRegistryINS_13ConfigurationENSt3__16vectorIPS3_NS4_9allocatorIS6_EEEEED2Ev:
 1344|  2.00k|  virtual ~AbstractRegistry(void) {
 1345|  2.00k|  }
easylogging++.cc:_ZN2el4base5utilsL10safeDeleteINS0_19TypedConfigurationsEEENSt3__19enable_ifIXsr3std10is_pointerIPT_EE5valueEvE4typeERS7_:
  889|  2.00k|safeDelete(T*& pointer) {
  890|  2.00k|  if (pointer == nullptr)
  ------------------
  |  Branch (890:7): [True: 1.00k, False: 1.00k]
  ------------------
  891|  1.00k|    return;
  892|  1.00k|  delete pointer;
  893|  1.00k|  pointer = nullptr;
  894|  1.00k|}
_ZN2el4base5utils8RegistryINS_6LoggerENSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEED2Ev:
 1434|  1.00k|  virtual ~Registry(void) {
 1435|  1.00k|    unregisterAll();
 1436|  1.00k|  }
_ZN2el4base5utils16AbstractRegistryINS_6LoggerENSt3__113unordered_mapINS4_12basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEPS3_NS4_4hashISB_EENS4_8equal_toISB_EENS9_INS4_4pairIKSB_SC_EEEEEEED2Ev:
 1344|  1.00k|  virtual ~AbstractRegistry(void) {
 1345|  1.00k|  }
_ZN2el4base5utils16RegistryWithPredINS_13ConfigurationENS3_9PredicateEEC2Ev:
 1489|  2.00k|  RegistryWithPred(void) {
 1490|  2.00k|  }
_ZN2el4base5utils16AbstractRegistryINS_13ConfigurationENSt3__16vectorIPS3_NS4_9allocatorIS6_EEEEEC2Ev:
 1299|  2.00k|  AbstractRegistry(void) {}
_ZN2el4base5utils16AbstractRegistryINS_13ConfigurationENSt3__16vectorIPS3_NS4_9allocatorIS6_EEEEEneERKSA_:
 1322|  1.00k|  bool operator!=(const AbstractRegistry<T_Ptr, Container>& other) {
 1323|  1.00k|    if (size() != other.size()) {
  ------------------
  |  Branch (1323:9): [True: 1.00k, False: 0]
  ------------------
 1324|  1.00k|      return true;
 1325|  1.00k|    }
 1326|      0|    for (std::size_t i = 0; i < m_list.size(); ++i) {
  ------------------
  |  Branch (1326:29): [True: 0, False: 0]
  ------------------
 1327|      0|      if (m_list.at(i) != other.m_list.at(i)) {
  ------------------
  |  Branch (1327:11): [True: 0, False: 0]
  ------------------
 1328|      0|        return true;
 1329|      0|      }
 1330|      0|    }
 1331|      0|    return false;
 1332|      0|  }
_ZN2el4base19TypedConfigurations14getConfigByRefINS0_9LogFormatEEERT_NS_5LevelEPNSt3__113unordered_mapIS6_S4_NS7_4hashIS6_EENS7_8equal_toIS6_EENS7_9allocatorINS7_4pairIKS6_S4_EEEEEEPKc:
 1996|  7.00k|  inline Conf_T& getConfigByRef(Level level, std::unordered_map<Level, Conf_T>* confMap, const char* confName) {
 1997|  7.00k|    base::threading::ScopedLock scopedLock(lock());
 1998|  7.00k|    return unsafeGetConfigByRef(level, confMap, confName);  // This is not unsafe anymore - mutex locked in scope
 1999|  7.00k|  }
_ZN2el4base19TypedConfigurations20unsafeGetConfigByRefINS0_9LogFormatEEERT_NS_5LevelEPNSt3__113unordered_mapIS6_S4_NS7_4hashIS6_EENS7_8equal_toIS6_EENS7_9allocatorINS7_4pairIKS6_S4_EEEEEEPKc:
 2019|  7.00k|  Conf_T& unsafeGetConfigByRef(Level level, std::unordered_map<Level, Conf_T>* confMap, const char* confName) {
 2020|  7.00k|    ELPP_UNUSED(confName);
  ------------------
  |  |  240|  7.00k|#define ELPP_UNUSED(x) (void)x
  ------------------
 2021|  7.00k|    typename std::unordered_map<Level, Conf_T>::iterator it = confMap->find(level);
 2022|  7.00k|    if (it == confMap->end()) {
  ------------------
  |  Branch (2022:9): [True: 0, False: 7.00k]
  ------------------
 2023|      0|      try {
 2024|      0|        return confMap->at(Level::Global);
 2025|      0|      } catch (...) {
 2026|      0|        ELPP_INTERNAL_ERROR("Unable to get configuration [" << confName << "] for level ["
 2027|      0|                            << LevelHelper::convertToString(level) << "]"
 2028|      0|                            << std::endl << "Please ensure you have properly configured logger.", false);
 2029|      0|        throw; // The exception has to be rethrown, to abort a branch leading to UB.
 2030|      0|      }
 2031|      0|    }
 2032|  7.00k|    return it->second;
 2033|  7.00k|  }
_ZN2el4base19TypedConfigurations8setValueINSt3__110shared_ptrINS3_13basic_fstreamIcNS3_11char_traitsIcEEEEEEEEvNS_5LevelERKT_PNS3_13unordered_mapISA_SB_NS3_4hashISA_EENS3_8equal_toISA_EENS3_9allocatorINS3_4pairIKSA_SB_EEEEEEb:
 2037|  1.00k|                bool includeGlobalLevel = true) {
 2038|       |    // If map is empty and we are allowed to add into generic level (Level::Global), do it!
 2039|  1.00k|    if (confMap->empty() && includeGlobalLevel) {
  ------------------
  |  Branch (2039:9): [True: 1.00k, False: 0]
  |  Branch (2039:29): [True: 1.00k, False: 0]
  ------------------
 2040|  1.00k|      confMap->insert(std::make_pair(Level::Global, value));
 2041|  1.00k|      return;
 2042|  1.00k|    }
 2043|       |    // If same value exist in generic level already, dont add it to explicit level
 2044|      0|    typename std::unordered_map<Level, Conf_T>::iterator it = confMap->find(Level::Global);
 2045|      0|    if (it != confMap->end() && it->second == value) {
  ------------------
  |  Branch (2045:9): [True: 0, False: 0]
  |  Branch (2045:9): [True: 0, False: 0]
  |  Branch (2045:33): [True: 0, False: 0]
  ------------------
 2046|      0|      return;
 2047|      0|    }
 2048|       |    // Now make sure we dont double up values if we really need to add it to explicit level
 2049|      0|    it = confMap->find(level);
 2050|      0|    if (it == confMap->end()) {
  ------------------
  |  Branch (2050:9): [True: 0, False: 0]
  ------------------
 2051|       |      // Value not found for level, add new
 2052|      0|      confMap->insert(std::make_pair(level, value));
 2053|      0|    } else {
 2054|       |      // Value found, just update value
 2055|      0|      confMap->at(level) = value;
 2056|      0|    }
 2057|      0|  }
_ZN2el4base19TypedConfigurations8setValueIbEEvNS_5LevelERKT_PNSt3__113unordered_mapIS3_S4_NS7_4hashIS3_EENS7_8equal_toIS3_EENS7_9allocatorINS7_4pairIKS3_S4_EEEEEEb:
 2037|  32.0k|                bool includeGlobalLevel = true) {
 2038|       |    // If map is empty and we are allowed to add into generic level (Level::Global), do it!
 2039|  32.0k|    if (confMap->empty() && includeGlobalLevel) {
  ------------------
  |  Branch (2039:9): [True: 4.00k, False: 28.0k]
  |  Branch (2039:29): [True: 4.00k, False: 0]
  ------------------
 2040|  4.00k|      confMap->insert(std::make_pair(Level::Global, value));
 2041|  4.00k|      return;
 2042|  4.00k|    }
 2043|       |    // If same value exist in generic level already, dont add it to explicit level
 2044|  28.0k|    typename std::unordered_map<Level, Conf_T>::iterator it = confMap->find(Level::Global);
 2045|  28.0k|    if (it != confMap->end() && it->second == value) {
  ------------------
  |  Branch (2045:9): [True: 28.0k, False: 0]
  |  Branch (2045:9): [True: 28.0k, False: 0]
  |  Branch (2045:33): [True: 28.0k, False: 0]
  ------------------
 2046|  28.0k|      return;
 2047|  28.0k|    }
 2048|       |    // Now make sure we dont double up values if we really need to add it to explicit level
 2049|      0|    it = confMap->find(level);
 2050|      0|    if (it == confMap->end()) {
  ------------------
  |  Branch (2050:9): [True: 0, False: 0]
  ------------------
 2051|       |      // Value not found for level, add new
 2052|      0|      confMap->insert(std::make_pair(level, value));
 2053|      0|    } else {
 2054|       |      // Value found, just update value
 2055|      0|      confMap->at(level) = value;
 2056|      0|    }
 2057|      0|  }
_ZN2el4base19TypedConfigurations8setValueINS0_9LogFormatEEEvNS_5LevelERKT_PNSt3__113unordered_mapIS4_S5_NS8_4hashIS4_EENS8_8equal_toIS4_EENS8_9allocatorINS8_4pairIKS4_S5_EEEEEEb:
 2037|  8.00k|                bool includeGlobalLevel = true) {
 2038|       |    // If map is empty and we are allowed to add into generic level (Level::Global), do it!
 2039|  8.00k|    if (confMap->empty() && includeGlobalLevel) {
  ------------------
  |  Branch (2039:9): [True: 1.00k, False: 7.00k]
  |  Branch (2039:29): [True: 1.00k, False: 0]
  ------------------
 2040|  1.00k|      confMap->insert(std::make_pair(Level::Global, value));
 2041|  1.00k|      return;
 2042|  1.00k|    }
 2043|       |    // If same value exist in generic level already, dont add it to explicit level
 2044|  7.00k|    typename std::unordered_map<Level, Conf_T>::iterator it = confMap->find(Level::Global);
 2045|  7.00k|    if (it != confMap->end() && it->second == value) {
  ------------------
  |  Branch (2045:9): [True: 7.00k, False: 0]
  |  Branch (2045:9): [True: 0, False: 7.00k]
  |  Branch (2045:33): [True: 0, False: 7.00k]
  ------------------
 2046|      0|      return;
 2047|      0|    }
 2048|       |    // Now make sure we dont double up values if we really need to add it to explicit level
 2049|  7.00k|    it = confMap->find(level);
 2050|  7.00k|    if (it == confMap->end()) {
  ------------------
  |  Branch (2050:9): [True: 7.00k, False: 0]
  ------------------
 2051|       |      // Value not found for level, add new
 2052|  7.00k|      confMap->insert(std::make_pair(level, value));
 2053|  7.00k|    } else {
 2054|       |      // Value found, just update value
 2055|      0|      confMap->at(level) = value;
 2056|      0|    }
 2057|  7.00k|  }
_ZN2el4base19TypedConfigurations8setValueINS0_18SubsecondPrecisionEEEvNS_5LevelERKT_PNSt3__113unordered_mapIS4_S5_NS8_4hashIS4_EENS8_8equal_toIS4_EENS8_9allocatorINS8_4pairIKS4_S5_EEEEEEb:
 2037|  8.00k|                bool includeGlobalLevel = true) {
 2038|       |    // If map is empty and we are allowed to add into generic level (Level::Global), do it!
 2039|  8.00k|    if (confMap->empty() && includeGlobalLevel) {
  ------------------
  |  Branch (2039:9): [True: 1.00k, False: 7.00k]
  |  Branch (2039:29): [True: 1.00k, False: 0]
  ------------------
 2040|  1.00k|      confMap->insert(std::make_pair(Level::Global, value));
 2041|  1.00k|      return;
 2042|  1.00k|    }
 2043|       |    // If same value exist in generic level already, dont add it to explicit level
 2044|  7.00k|    typename std::unordered_map<Level, Conf_T>::iterator it = confMap->find(Level::Global);
 2045|  7.00k|    if (it != confMap->end() && it->second == value) {
  ------------------
  |  Branch (2045:9): [True: 7.00k, False: 0]
  |  Branch (2045:9): [True: 7.00k, False: 0]
  |  Branch (2045:33): [True: 7.00k, False: 0]
  ------------------
 2046|  7.00k|      return;
 2047|  7.00k|    }
 2048|       |    // Now make sure we dont double up values if we really need to add it to explicit level
 2049|      0|    it = confMap->find(level);
 2050|      0|    if (it == confMap->end()) {
  ------------------
  |  Branch (2050:9): [True: 0, False: 0]
  ------------------
 2051|       |      // Value not found for level, add new
 2052|      0|      confMap->insert(std::make_pair(level, value));
 2053|      0|    } else {
 2054|       |      // Value found, just update value
 2055|      0|      confMap->at(level) = value;
 2056|      0|    }
 2057|      0|  }
_ZN2el4base19TypedConfigurations8setValueImEEvNS_5LevelERKT_PNSt3__113unordered_mapIS3_S4_NS7_4hashIS3_EENS7_8equal_toIS3_EENS7_9allocatorINS7_4pairIKS3_S4_EEEEEEb:
 2037|  16.0k|                bool includeGlobalLevel = true) {
 2038|       |    // If map is empty and we are allowed to add into generic level (Level::Global), do it!
 2039|  16.0k|    if (confMap->empty() && includeGlobalLevel) {
  ------------------
  |  Branch (2039:9): [True: 2.00k, False: 14.0k]
  |  Branch (2039:29): [True: 2.00k, False: 0]
  ------------------
 2040|  2.00k|      confMap->insert(std::make_pair(Level::Global, value));
 2041|  2.00k|      return;
 2042|  2.00k|    }
 2043|       |    // If same value exist in generic level already, dont add it to explicit level
 2044|  14.0k|    typename std::unordered_map<Level, Conf_T>::iterator it = confMap->find(Level::Global);
 2045|  14.0k|    if (it != confMap->end() && it->second == value) {
  ------------------
  |  Branch (2045:9): [True: 14.0k, False: 0]
  |  Branch (2045:9): [True: 14.0k, False: 0]
  |  Branch (2045:33): [True: 14.0k, False: 0]
  ------------------
 2046|  14.0k|      return;
 2047|  14.0k|    }
 2048|       |    // Now make sure we dont double up values if we really need to add it to explicit level
 2049|      0|    it = confMap->find(level);
 2050|      0|    if (it == confMap->end()) {
  ------------------
  |  Branch (2050:9): [True: 0, False: 0]
  ------------------
 2051|       |      // Value not found for level, add new
 2052|      0|      confMap->insert(std::make_pair(level, value));
 2053|      0|    } else {
 2054|       |      // Value found, just update value
 2055|      0|      confMap->at(level) = value;
 2056|      0|    }
 2057|      0|  }
_ZN2el4base5utils8RegistryINS_6LoggerENSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEEC2Ev:
 1413|  1.00k|  Registry(void) {}
_ZN2el4base5utils16AbstractRegistryINS_6LoggerENSt3__113unordered_mapINS4_12basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEPS3_NS4_4hashISB_EENS4_8equal_toISB_EENS9_INS4_4pairIKSB_SC_EEEEEEEC2Ev:
 1299|  1.00k|  AbstractRegistry(void) {}
_ZN2el4base7Storage26installLogDispatchCallbackINS0_26DefaultLogDispatchCallbackEEEbRKNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEE:
 2708|  1.00k|  inline bool installLogDispatchCallback(const std::string& id) {
 2709|  1.00k|    return base::utils::Utils::installCallback<T, base::type::LogDispatchCallbackPtr>(id, &m_logDispatchCallbacks);
 2710|  1.00k|  }
_ZN2el4base5utils5Utils15installCallbackINS0_26DefaultLogDispatchCallbackENSt3__110shared_ptrINS_19LogDispatchCallbackEEEEEbRKNS5_12basic_stringIcNS5_11char_traitsIcEENS5_9allocatorIcEEEEPNS5_13unordered_mapISE_T0_NS5_4hashISE_EENS5_8equal_toISE_EENSC_INS5_4pairISF_SI_EEEEEE:
 1572|  1.00k|  static bool installCallback(const std::string& id, std::unordered_map<std::string, TPtr>* mapT) {
 1573|  1.00k|    if (mapT->find(id) == mapT->end()) {
  ------------------
  |  Branch (1573:9): [True: 1.00k, False: 0]
  ------------------
 1574|  1.00k|      mapT->insert(std::make_pair(id, TPtr(new T())));
 1575|  1.00k|      return true;
 1576|  1.00k|    }
 1577|      0|    return false;
 1578|  1.00k|  }
_ZN2el8CallbackINS_15LogDispatchDataEEC2Ev:
 2184|  1.00k|  Callback(void) : m_enabled(true) {}
easylogging++.cc:_ZN2el4base5utilsL10safeDeleteINS0_21RegisteredHitCountersEEENSt3__19enable_ifIXsr3std10is_pointerIPT_EE5valueEvE4typeERS7_:
  889|  1.00k|safeDelete(T*& pointer) {
  890|  1.00k|  if (pointer == nullptr)
  ------------------
  |  Branch (890:7): [True: 0, False: 1.00k]
  ------------------
  891|      0|    return;
  892|  1.00k|  delete pointer;
  893|  1.00k|  pointer = nullptr;
  894|  1.00k|}
easylogging++.cc:_ZN2el4base5utilsL10safeDeleteINS0_17RegisteredLoggersEEENSt3__19enable_ifIXsr3std10is_pointerIPT_EE5valueEvE4typeERS7_:
  889|  1.00k|safeDelete(T*& pointer) {
  890|  1.00k|  if (pointer == nullptr)
  ------------------
  |  Branch (890:7): [True: 0, False: 1.00k]
  ------------------
  891|      0|    return;
  892|  1.00k|  delete pointer;
  893|  1.00k|  pointer = nullptr;
  894|  1.00k|}
easylogging++.cc:_ZN2el4base5utilsL10safeDeleteINS0_9VRegistryEEENSt3__19enable_ifIXsr3std10is_pointerIPT_EE5valueEvE4typeERS7_:
  889|  1.00k|safeDelete(T*& pointer) {
  890|  1.00k|  if (pointer == nullptr)
  ------------------
  |  Branch (890:7): [True: 0, False: 1.00k]
  ------------------
  891|      0|    return;
  892|  1.00k|  delete pointer;
  893|  1.00k|  pointer = nullptr;
  894|  1.00k|}
easylogging++.cc:_ZN2el4base5utilsL10safeDeleteINS_13ConfigurationEEENSt3__19enable_ifIXsr3std10is_pointerIPT_EE5valueEvE4typeERS7_:
  889|   144k|safeDelete(T*& pointer) {
  890|   144k|  if (pointer == nullptr)
  ------------------
  |  Branch (890:7): [True: 0, False: 144k]
  ------------------
  891|      0|    return;
  892|   144k|  delete pointer;
  893|   144k|  pointer = nullptr;
  894|   144k|}

LLVMFuzzerTestOneInput:
  287|  2.00k|BEGIN_SIMPLE_FUZZER()
  ------------------
  |  |   53|  1.00k|  { \
  |  |   54|  1.00k|    try \
  |  |   55|  1.00k|    { \
  |  |   56|  1.00k|      static bool first = true; \
  |  |   57|  1.00k|      if (first) \
  |  |  ------------------
  |  |  |  Branch (57:11): [True: 1, False: 999]
  |  |  ------------------
  |  |   58|  1.00k|      { \
  |  |   59|      1|        if (init()) \
  |  |  ------------------
  |  |  |  Branch (59:13): [True: 0, False: 1]
  |  |  ------------------
  |  |   60|      1|          return 1; \
  |  |   61|      1|        first = false; \
  |  |   62|      1|      } \
  ------------------
  288|       |
  289|       |#if 0
  290|       |  epee::levin::bucket_head2 req_head;
  291|       |  req_head.m_signature = LEVIN_SIGNATURE;
  292|       |  req_head.m_cb = 0;
  293|       |  req_head.m_have_to_return_data = true;
  294|       |  req_head.m_command = 2000;
  295|       |  req_head.m_flags = LEVIN_PACKET_REQUEST;
  296|       |  req_head.m_protocol_version = LEVIN_PROTOCOL_VER_1;
  297|       |  req_head.m_return_code = 0;
  298|       |  FILE *f=fopen("/tmp/out.levin", "w");
  299|       |  fwrite(&req_head,sizeof(req_head),1, f);
  300|       |  fclose(f);
  301|       |#endif
  302|       |    //std::unique_ptr<test_connection> conn = new test();
  303|  1.00k|    boost::asio::io_context io_service;
  304|  1.00k|    test_levin_protocol_handler_config m_handler_config;
  305|  1.00k|    test_levin_commands_handler *m_pcommands_handler = new test_levin_commands_handler();
  306|  1.00k|    m_handler_config.set_handler(m_pcommands_handler, [](epee::levin::levin_commands_handler<test_levin_connection_context> *handler) { delete handler; });
  307|  1.00k|    std::unique_ptr<test_connection> conn(new test_connection(io_service, m_handler_config));
  308|  1.00k|    conn->start();
  309|       |    //m_commands_handler.invoke_out_buf(expected_out_data);
  310|       |    //m_commands_handler.return_code(expected_return_code);
  311|  1.00k|    conn->m_protocol_handler.handle_recv(buf, len);
  312|  1.00k|END_SIMPLE_FUZZER()
  ------------------
  |  |   65|  1.00k|    } \
  |  |   66|  1.00k|    catch (const std::exception &e) \
  |  |   67|  1.00k|    { \
  |  |   68|      0|      fprintf(stderr, "Exception: %s\n", e.what()); \
  |  |   69|      0|      delete el::base::elStorage; \
  |  |   70|      0|      el::base::elStorage = NULL; \
  |  |   71|      0|      return 0; \
  |  |   72|      0|    } \
  |  |   73|  1.00k|    delete el::base::elStorage; \
  |  |   74|  1.00k|    el::base::elStorage = NULL; \
  |  |   75|  1.00k|    return 0; \
  |  |   76|  1.00k|  } \
  ------------------
levin.cpp:_ZL4initv:
  284|      2|BEGIN_INIT_SIMPLE_FUZZER()
  ------------------
  |  |   36|      1|  { \
  |  |   37|      1|    try \
  |  |   38|      1|    {
  ------------------
  285|      2|END_INIT_SIMPLE_FUZZER()
  ------------------
  |  |   41|      1|    } \
  |  |   42|      1|    catch (const std::exception &e) \
  |  |   43|      1|    { \
  |  |   44|      0|      fprintf(stderr, "Exception: %s\n", e.what()); \
  |  |   45|      0|      return 1; \
  |  |   46|      0|    } \
  |  |   47|      1|    return 0; \
  |  |   48|      1|  }
  ------------------
levin.cpp:_ZN12_GLOBAL__N_127test_levin_commands_handlerC2Ev:
   66|  1.00k|      : m_return_code(LEVIN_OK)
  ------------------
  |  |  102|  1.00k|#define LEVIN_OK                                        0
  ------------------
   67|  1.00k|      , m_last_command(-1)
   68|  1.00k|    {
   69|  1.00k|    }
levin.cpp:_ZN12_GLOBAL__N_112call_counterC2Ev:
   42|  6.00k|    call_counter() : m_counter(0) { }
levin.cpp:_ZN12_GLOBAL__N_127test_levin_commands_handler6invokeEiN4epee4spanIKhEERNS1_11byte_streamERNS_29test_levin_connection_contextE:
   72|  3.68k|    {
   73|  3.68k|      m_invoke_counter.inc();
   74|  3.68k|      boost::unique_lock<boost::mutex> lock(m_mutex);
   75|  3.68k|      m_last_command = command;
   76|  3.68k|      m_last_in_buf = std::string((const char*)in_buff.data(), in_buff.size());
   77|  3.68k|      buff_out.write(epee::to_span(m_invoke_out_buf));
   78|  3.68k|      return m_return_code;
   79|  3.68k|    }
levin.cpp:_ZNV12_GLOBAL__N_112call_counter3incEv:
   45|  11.1k|    void inc() volatile { m_counter.fetch_add(1, std::memory_order_relaxed); }
levin.cpp:_ZN12_GLOBAL__N_127test_levin_commands_handler6notifyEiN4epee4spanIKhEERNS_29test_levin_connection_contextE:
   82|  1.78k|    {
   83|  1.78k|      m_notify_counter.inc();
   84|  1.78k|      boost::unique_lock<boost::mutex> lock(m_mutex);
   85|  1.78k|      m_last_command = command;
   86|  1.78k|      m_last_in_buf = std::string((const char*)in_buff.data(), in_buff.size());
   87|  1.78k|      return m_return_code;
   88|  1.78k|    }
levin.cpp:_ZN12_GLOBAL__N_127test_levin_commands_handler17on_connection_newERNS_29test_levin_connection_contextE:
   97|  1.00k|    {
   98|  1.00k|      m_new_connection_counter.inc();
   99|       |      //std::cout << "test_levin_commands_handler::on_connection_new()" << std::endl;
  100|  1.00k|    }
levin.cpp:_ZN12_GLOBAL__N_127test_levin_commands_handler19on_connection_closeERNS_29test_levin_connection_contextE:
  103|  1.00k|    {
  104|  1.00k|      m_close_connection_counter.inc();
  105|       |      //std::cout << "test_levin_commands_handler::on_connection_close()" << std::endl;
  106|  1.00k|    }
levin.cpp:_ZZ22LLVMFuzzerTestOneInputENK3$_0clEPN4epee5levin22levin_commands_handlerIN12_GLOBAL__N_129test_levin_connection_contextEEE:
  306|  1.00k|    m_handler_config.set_handler(m_pcommands_handler, [](epee::levin::levin_commands_handler<test_levin_connection_context> *handler) { delete handler; });
levin.cpp:_ZN12_GLOBAL__N_115test_connectionC2ERN5boost4asio10io_contextERN4epee5levin29async_protocol_handler_configINS_29test_levin_connection_contextEEE:
  142|  1.00k|      : m_io_service(io_service)
  143|  1.00k|      , m_protocol_handler(this, protocol_config, m_context)
  144|  1.00k|      , m_send_return(true)
  145|  1.00k|    {
  146|  1.00k|    }
levin.cpp:_ZN12_GLOBAL__N_115test_connection7do_sendEN4epee10byte_sliceE:
  155|  3.68k|    {
  156|  3.68k|      m_send_counter.inc();
  157|  3.68k|      boost::unique_lock<boost::mutex> lock(m_mutex);
  158|  3.68k|      m_last_send_data.append(reinterpret_cast<const char*>(message.data()), message.size());
  159|  3.68k|      return m_send_return;
  160|  3.68k|    }
levin.cpp:_ZN12_GLOBAL__N_115test_connection5startEv:
  149|  1.00k|    {
  150|  1.00k|      m_protocol_handler.after_init_connection();
  151|  1.00k|    }
levin.cpp:_ZNK12_GLOBAL__N_129test_levin_connection_context13get_max_bytesEi:
   57|  8.10k|    size_t get_max_bytes(int command) const { return LEVIN_DEFAULT_MAX_PACKET_SIZE; }
  ------------------
  |  |   77|  8.10k|#define LEVIN_DEFAULT_MAX_PACKET_SIZE 100000000      //100MB by default after handshake
  ------------------
levin.cpp:_ZN12_GLOBAL__N_129test_levin_connection_context17handshake_commandEv:
   55|  3.68k|    static constexpr int handshake_command() noexcept { return 1001; }
levin.cpp:_ZN12_GLOBAL__N_129test_levin_connection_context18handshake_completeEv:
   56|  1.17k|    static constexpr bool handshake_complete() noexcept { return true; }

