mirror of
https://github.com/Icinga/icinga2.git
synced 2025-09-26 02:58:43 +02:00
Benchmark actual query exe.
This commit is contained in:
parent
08e2d9fc00
commit
9cda9396bf
@ -570,6 +570,11 @@ void IdoMysqlConnection::FinishAsyncQueries()
|
||||
|
||||
String query = querybuf.str();
|
||||
|
||||
Log(LogDebug, "IdoMysqlConnectionDebug")
|
||||
<< "Actually firing " << count << " async queries";
|
||||
|
||||
auto started (Utility::GetTime());
|
||||
|
||||
if (m_Mysql->query(&m_Connection, query.CStr()) != 0) {
|
||||
std::ostringstream msgbuf;
|
||||
String message = m_Mysql->error(&m_Connection);
|
||||
@ -624,6 +629,9 @@ void IdoMysqlConnection::FinishAsyncQueries()
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Log(LogDebug, "IdoMysqlConnectionDebug")
|
||||
<< "Took " << (Utility::GetTime() - started) << " seconds";
|
||||
}
|
||||
|
||||
if (m_UncommittedAsyncQueries > 25000) {
|
||||
@ -649,6 +657,11 @@ IdoMysqlResult IdoMysqlConnection::Query(const String& query)
|
||||
|
||||
IncreaseQueryCount();
|
||||
|
||||
Log(LogDebug, "IdoMysqlConnectionDebug")
|
||||
<< "Actually firing 1 sync queries";
|
||||
|
||||
auto started (Utility::GetTime());
|
||||
|
||||
if (m_Mysql->query(&m_Connection, query.CStr()) != 0) {
|
||||
std::ostringstream msgbuf;
|
||||
String message = m_Mysql->error(&m_Connection);
|
||||
@ -666,6 +679,9 @@ IdoMysqlResult IdoMysqlConnection::Query(const String& query)
|
||||
|
||||
m_AffectedRows = m_Mysql->affected_rows(&m_Connection);
|
||||
|
||||
Log(LogDebug, "IdoMysqlConnectionDebug")
|
||||
<< "Took " << (Utility::GetTime() - started) << " seconds";
|
||||
|
||||
if (!result) {
|
||||
if (m_Mysql->field_count(&m_Connection) > 0) {
|
||||
std::ostringstream msgbuf;
|
||||
|
Loading…
x
Reference in New Issue
Block a user