Re: [akka-user] Recording latency of operations that return a Future inside an akka stream

2015-01-01 Thread Soumya Simanta
Endre, Thank you for responding. I was trying to do something like this. However, I'm not sure if what you have mentioned above will work because the Redis set API returns a Future[Boolean]. So in the map after my mapAsyncUnordered I've no reference to the operation that finished before that

Re: [akka-user] Recording latency of operations that return a Future inside an akka stream

2015-01-01 Thread Akka Team
Hi, One pitfall in your simple map approach is that you might measure the wrong values. Remember that mapAsyncUnordered is, well, unordered and batching, so you cannot expect that the elements come out in the same order as they entered. On approach would be to record the start time of elements in

Re: [akka-user] Recording latency of operations that return a Future inside an akka stream

2015-01-01 Thread Akka Team
Hi, On Thu, Jan 1, 2015 at 6:21 PM, Soumya Simanta soumya.sima...@gmail.com wrote: Endre, Thank you for responding. I was trying to do something like this. However, I'm not sure if what you have mentioned above will work because the Redis set API returns a Future[Boolean]. So in the map

Re: [akka-user] Recording latency of operations that return a Future inside an akka stream

2014-12-27 Thread Konrad 'ktoso' Malawski
Hi Soumya, I don’t think what you’ll end up measuring this way will be very useful. I mean, between the completion of the future and the triggering of the map there are multiple asynchronous boundaries… So you won’t be measuring how fast the set operation was, but how much time was between

[akka-user] Recording latency of operations that return a Future inside an akka stream

2014-12-25 Thread Soumya Simanta
This is related to this https://groups.google.com/forum/#!topic/akka-user/NrSkEwMrS3s thread but sufficiently different that I decided to create new thread. Hope that's okay. I would like to create a histogram of latency of a large number of set operations ( set returns a Future[Boolean])