LuciferYang commented on code in PR #13144:
URL: https://github.com/apache/gluten/pull/13144#discussion_r4178595608


##########
gluten-core/src/test/scala/org/apache/gluten/iterator/IteratorSuite.scala:
##########
@@ -24,6 +24,21 @@ import org.scalatest.funsuite.AnyFunSuite
 
 class IteratorV1Suite extends IteratorSuite {
   override protected def wrap[A](in: Iterator[A]): WrapperBuilder[A] = 
Iterators.wrap(V1, in)
+
+  test("Sub-millisecond read durations accumulate with carry-over instead of 
truncating") {
+    val reported = scala.collection.mutable.ArrayBuffer.empty[Long]
+    val accumulator = new IteratorsV1.NanosToMillisAccumulator(reported += _)

Review Comment:
   Done in f53a5c563. The test now goes through 
`wrap(...).collectReadNanos(...)`, the same `WrapperBuilder` path 
`ColumnarToColumnarExec` uses, with an iterator whose `hasNext` and `next` each 
sleep 1ms, and asserts every report is at least 1ms in nanoseconds. For the 
`selfTime` wiring itself, `MiscOperatorSuite` "combine small batches before 
shuffle" now asserts the metric is `nsTiming` and positive.



-- 
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