title: How to calculate the processing time in rx
body: <p>For the following flow, I am wondering how I can calculate the time it takes to process all the data in forEach(...).</p>
  
  <pre><code>Observable
    .from(1,2,3)
    .flatMap(it - {})
    .toBlocking()
    .forEarch(it -&gt; {//some paring logic here})
  </code></pre>
  
  <p><strong>EDIT</strong></p>
  
  <p>After reading this tutorial: <a href="http://www.introtorx.com/Content/v1.0.10621.0/10_LeavingTheMonad.html#LeavingTheMonad" rel="nofollow">Leaving the Monad</a>, I feel the simple solution would be to do the following. Let me know if I missed something</p>
  
  <pre><code>List items = Observable
        .from(1,2,3)
        .flatMap(it - {})
        .toList();
  
  long startTime = System.currentTimeMillis();
  
  for(Object it : items)
  {
    //some parsing here
  }
  
  long processingTime = System.currentTimeMillis() - startTime 
  </code></pre>