From 9defd49c6d9e1e33f843f060a44b2cb2cf2c3b1c Mon Sep 17 00:00:00 2001 From: dimitr Date: Mon, 1 Sep 2014 08:29:04 +0000 Subject: [PATCH] Count record reads performed by the IDX code. --- src/jrd/vio.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/jrd/vio.cpp b/src/jrd/vio.cpp index fd8d1ef494..0b6fd269ea 100644 --- a/src/jrd/vio.cpp +++ b/src/jrd/vio.cpp @@ -2090,6 +2090,8 @@ bool VIO_get_current(thread_db* tdbb, rec_tx_active = false; + bool counted = false; + while (true) { // If the record doesn't exist, no problem. @@ -2113,6 +2115,12 @@ bool VIO_get_current(thread_db* tdbb, else VIO_data(tdbb, rpb, pool); + if (!counted) + { + tdbb->bumpRelStats(RuntimeStatistics::RECORD_IDX_READS, rpb->rpb_relation->rel_id); + counted = true; + } + // If we deleted the record, everything's fine, otherwise // the record must be considered real.