From d4353e8cc4a6fa36c0af4e8e38db03ad1e274e35 Mon Sep 17 00:00:00 2001 From: Tyler Karaszewski Date: Thu, 3 Sep 2020 13:24:58 -0700 Subject: [PATCH] Add more precision to commit timing --- sqlitecluster/SQLite.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sqlitecluster/SQLite.cpp b/sqlitecluster/SQLite.cpp index 609484513..74b6b2c2d 100644 --- a/sqlitecluster/SQLite.cpp +++ b/sqlitecluster/SQLite.cpp @@ -829,7 +829,9 @@ int SQLite::commit() { } else { result = SQuery(_db, "committing db transaction", "COMMIT"); } - SINFO("SQuery 'COMMIT' took " << ((STimeNow() - beforeCommit)/1000) << "ms."); + char time[16]; + snprintf(time, 16, "%.2fms", (double)(STimeNow() - beforeCommit) / 1000.0); + SINFO("SQuery 'COMMIT' took " << time << "."); // And record pages after the commit. int endPages;