Hi Peter,

On 9 December 2014 at 16:50:45, Peter ([email protected]) wrote:

Hi

Interested in using context.children.size periodically (every 5 - 10 seconds) 
and use it as a metric. There will be 1000s to 10,000s of child actors in this 
scenario (Akka IO listening actor). 

Is this realistic in terms of runtime overhead? Would this be a constant, 
linear or logarithmic operation? I noticed some warnings in the 
context.children declaration comments. 


The thing returned from context.children is an iterable which in general has an 
O(n) size operator. It could definitley become a bottleneck. If you really want 
to keep track of the number you can just increment and decrement a counter when 
children are created/stopped (using watch to see when they terminate).

B/


Thanks!
Peter
--
>>>>>>>>>> Read the docs: http://akka.io/docs/
>>>>>>>>>> Check the FAQ: 
>>>>>>>>>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>>>>>>>>> Search the archives: https://groups.google.com/group/akka-user
---
You received this message because you are subscribed to the Google Groups "Akka 
User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.

-- 
Björn Antonsson
Typesafe – Reactive Apps on the JVM
twitter: @bantonsson

-- 
>>>>>>>>>>      Read the docs: http://akka.io/docs/
>>>>>>>>>>      Check the FAQ: 
>>>>>>>>>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>>>>>>>>>      Search the archives: https://groups.google.com/group/akka-user
--- 
You received this message because you are subscribed to the Google Groups "Akka 
User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.

Reply via email to