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


##########
gluten-core/src/test/scala/org/apache/gluten/iterator/IteratorSuite.scala:
##########
@@ -22,13 +22,45 @@ import org.apache.spark.task.TaskResources
 
 import org.scalatest.funsuite.AnyFunSuite
 
+import java.util.concurrent.TimeUnit
+
 class IteratorV1Suite extends IteratorSuite {
   override protected def wrap[A](in: Iterator[A]): WrapperBuilder[A] = 
Iterators.wrap(V1, in)
 }
 
 abstract class IteratorSuite extends AnyFunSuite {
   protected def wrap[A](in: Iterator[A]): WrapperBuilder[A]
 
+  test("Read time is reported in nanoseconds per read") {
+    val reported = scala.collection.mutable.ArrayBuffer.empty[Long]
+    // Both hasNext and next sleep at least 1ms, so every reported duration 
has a hard
+    // lower bound that does not depend on the clock's resolution.

Review Comment:
   After the switch to nanoseconds there is no carry-over left to test. A pause 
cannot make a per-call millisecond implementation pass either: it reports about 
1 for a 1ms sleep, so reaching the 1,000,000 bound would take a single read of 
roughly 1000 seconds.



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