22 const std::string& info){
30 ss <<
"DEBUGInfoCollector: "
33 std::size_t msg_i {0};
34 for(
const auto& i:
m_info){
35 ss <<
"msg " << msg_i <<
": " << i.first <<
'\n';
37 for(
const auto& m : i.second){
39 ss << int(m.first) <<
" " << m.second <<
'\n';}
47 std::map<unsigned long, std::string> by_time;
49 for(
const auto& p :
m_info){
50 for(
const auto& tm : p.second){
55 auto timestamp =
static_cast<unsigned long>(tm.first);
56 by_time[timestamp] = p.first +
" " + tm.second;
61 ss <<
"DEBUGInfoCollector: "
64 for(
const auto& i: by_time){
65 ss << i.first <<
" " << i.second <<
'\n';
77 std::ofstream out(
m_name+
".log");
virtual void collect(const std::string &, const std::string &) override
std::map< std::string, std::vector< std::pair< double, std::string > > > m_info
DebugInfoCollector(const std::string &name="Unknown", bool byTime=true)
virtual std::string toString() const override
std::string toStringByMsgKey() const
std::string toStringByTime() const
virtual void write() const override