From 68aa1b745440975929d9c467c22b7fc6973994a4 Mon Sep 17 00:00:00 2001 From: Chris Larsen Date: Mon, 3 Jan 2022 15:55:46 -0800 Subject: [PATCH] Add the queue size to the StreamOps.blockingQueue (#1400) --- .../src/main/scala/com/netflix/atlas/akka/StreamOps.scala | 3 +++ 1 file changed, 3 insertions(+) diff --git a/atlas-akka/src/main/scala/com/netflix/atlas/akka/StreamOps.scala b/atlas-akka/src/main/scala/com/netflix/atlas/akka/StreamOps.scala index a70407bb3..6c63b555f 100644 --- a/atlas-akka/src/main/scala/com/netflix/atlas/akka/StreamOps.scala +++ b/atlas-akka/src/main/scala/com/netflix/atlas/akka/StreamOps.scala @@ -195,6 +195,9 @@ object StreamOps extends StrictLogging { /** Check if the queue is open to take more data. */ def isOpen: Boolean = !completed + + /** The approximate number of entries in the queue. */ + def size: Int = queue.size() } /**