94 {
96 std::stringstream strm;
97 strm << "SQL PROFILE:\r\nStatements: " << m_sqls.size() << "\r\n";
98 std::list<sqls_map::iterator> m_sorted_by_time_sqls;
99 for(std::map<std::string, profile_entry>::iterator it = m_sqls.begin();it!=m_sqls.end();it++)
100 m_sorted_by_time_sqls.push_back(it);
101
103
104 for(std::list<sqls_map::iterator>::iterator it = m_sorted_by_time_sqls.begin();it!=m_sorted_by_time_sqls.end();it++)
105 {
106 strm << "---------------------------------------------------------------------------------------------------------\r\nSQL: " << (*it)->first << "\r\n";
107 strm << "\tavrg: " << (*it)->second.m_avrg.get_avg() << "\r\n\tmax: " << (*it)->second.m_max_time << "\r\n\tmin: " << (*it)->second.m_min_time << "\r\n\tcount: " << (*it)->second.m_call_count << "\r\n";
108 }
109
112 }
static bool sort_by_timing(const sqls_map::iterator &a, const sqls_map::iterator &b)
bool save_string_to_file(const std::string &path_to_file, const std::string &str)
#define CRITICAL_REGION_END()
#define CRITICAL_REGION_BEGIN(x)