From 0d4d4930a95c0f7618b38d5345dd88bdac5def5a Mon Sep 17 00:00:00 2001 From: Thomas Gelf Date: Tue, 11 Nov 2014 21:07:02 +0100 Subject: [PATCH] Db\DbConnection: benchmark single row fetches --- library/Icinga/Data/Db/DbConnection.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/library/Icinga/Data/Db/DbConnection.php b/library/Icinga/Data/Db/DbConnection.php index 5fb08730e..82686893d 100644 --- a/library/Icinga/Data/Db/DbConnection.php +++ b/library/Icinga/Data/Db/DbConnection.php @@ -216,7 +216,10 @@ class DbConnection implements Selectable */ public function fetchRow(DbQuery $query) { - return $this->dbAdapter->fetchRow($query->getSelectQuery()); + Benchmark::measure('DB is fetching row'); + $result = $this->dbAdapter->fetchRow($query->getSelectQuery()); + Benchmark::measure('DB row done'); + return $result; } /**