Benchmark FinishAsyncQueries

This commit is contained in:
Alexander A. Klimov 2022-03-28 17:06:43 +02:00
parent a652c4f52a
commit 06e0d75f99

View File

@ -530,6 +530,11 @@ void IdoMysqlConnection::FinishAsyncQueries()
std::vector<IdoAsyncQuery> queries; std::vector<IdoAsyncQuery> queries;
m_AsyncQueries.swap(queries); m_AsyncQueries.swap(queries);
Log(LogDebug, "IdoMysqlConnectionDebug")
<< "About to fire " << queries.size() << " async queries";
auto started (Utility::GetTime());
std::vector<IdoAsyncQuery>::size_type offset = 0; std::vector<IdoAsyncQuery>::size_type offset = 0;
// This will be executed if there is a problem with executing the queries, // This will be executed if there is a problem with executing the queries,
@ -649,6 +654,9 @@ void IdoMysqlConnection::FinishAsyncQueries()
Query("COMMIT"); Query("COMMIT");
Query("BEGIN"); Query("BEGIN");
} }
Log(LogDebug, "IdoMysqlConnectionDebug")
<< "FinishAsyncQueries took " << (Utility::GetTime() - started) << " seconds";
} }
IdoMysqlResult IdoMysqlConnection::Query(const String& query) IdoMysqlResult IdoMysqlConnection::Query(const String& query)