mike-tr-adamson commented on code in PR #3122:
URL: https://github.com/apache/cassandra/pull/3122#discussion_r1502578904


##########
src/java/org/apache/cassandra/index/sai/plan/StorageAttachedIndexSearcher.java:
##########
@@ -370,13 +372,20 @@ private UnfilteredRowIterator 
queryStorageAndFilter(PrimaryKey key)
                 return null;
 
             lastKey = key;
+            long startTimeNanos = Clock.Global.nanoTime();
 
             try (UnfilteredRowIterator partition = 
queryController.queryStorage(key, executionController))
             {
                 queryContext.partitionsRead++;
                 queryContext.checkpoint();
 
-                return applyIndexFilter(key, partition, filterTree, 
queryContext);
+                UnfilteredRowIterator filtered = applyIndexFilter(key, 
partition, filterTree, queryContext);
+
+                // Note that we record the duration of the read after 
post-filtering, which actually 
+                // materializes the rows from disk.
+                
queryController.tableQueryMetrics.postFilteringReadLatency.update(Clock.Global.nanoTime()
 - startTimeNanos, TimeUnit.NANOSECONDS);

Review Comment:
   Just to clarify, this is recording the per-partition post-filtering latency. 
Do we want to change the metric name to reflect this. Something like 
`postFilteringPartitionReadLatency`? 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to