#include <ado_db_helper.h>
Definition at line 82 of file ado_db_helper.h.
◆ sqls_map
◆ profiler_manager()
| epee::ado_db_helper::profiler_manager::profiler_manager |
( |
| ) |
|
|
inline |
◆ flush_log()
| bool epee::ado_db_helper::profiler_manager::flush_log |
( |
const std::string & |
path | ) |
|
|
inline |
Definition at line 93 of file ado_db_helper.h.
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);
104 for(std::list<sqls_map::iterator>::iterator it = m_sorted_by_time_sqls.begin();it!=m_sorted_by_time_sqls.end();it++)
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";
static bool sort_by_timing(const sqls_map::iterator &a, const sqls_map::iterator &b)
#define CRITICAL_REGION_END()
#define CRITICAL_REGION_BEGIN(x)
bool save_string_to_file(const std::string &path_to_file, const std::string &str)
◆ get_entry_avarege()
| bool epee::ado_db_helper::profiler_manager::get_entry_avarege |
( |
const std::string |
sql, |
|
|
DWORD & |
time |
|
) |
| |
|
inline |
Definition at line 126 of file ado_db_helper.h.
129 sqls_map::iterator it = m_sqls.find(sql);
133 time =
static_cast<DWORD
>(it->second.m_avrg.get_avg());
#define CRITICAL_REGION_END()
#define CRITICAL_REGION_BEGIN(x)
◆ push_entry()
| bool epee::ado_db_helper::profiler_manager::push_entry |
( |
const std::string |
sql, |
|
|
DWORD |
time |
|
) |
| |
|
inline |
Definition at line 114 of file ado_db_helper.h.
117 profile_entry& entry_ref = m_sqls[sql];
118 entry_ref.m_avrg.push(
time);
119 entry_ref.m_call_count++;
120 if(
time > entry_ref.m_max_time) entry_ref.m_max_time =
time;
121 if(
time < entry_ref.m_min_time || entry_ref.m_min_time == 0) entry_ref.m_min_time =
time;
#define CRITICAL_REGION_END()
#define CRITICAL_REGION_BEGIN(x)
◆ sort_by_timing()
| static bool epee::ado_db_helper::profiler_manager::sort_by_timing |
( |
const sqls_map::iterator & |
a, |
|
|
const sqls_map::iterator & |
b |
|
) |
| |
|
inlinestatic |
Definition at line 88 of file ado_db_helper.h.
90 return a->second.m_avrg.get_avg() > b->second.m_avrg.get_avg();
const GenericPointer< typename T::ValueType > T2 T::AllocatorType & a
The documentation for this class was generated from the following file:
- /home/abuild/rpmbuild/BUILD/electroneum-5.0.0.4/contrib/epee/include/ado_db_helper.h