title: Usage of elapsed() function work on Mono?
body: <p>I am trying to get execution time for reading from redis in reactive programming, on looking up docs I am able to see that <code>elapsed()</code> method will does the same and implemented code as below.</p>
  
  <pre><code>Flux.fromIterable(getActions(httpHeaders))
                  .parallel()
                  .runOn(Schedulers.parallel())
                  .flatMap(actionFact -&gt; methodToReadFromCache(actionFact))
                  .sequential();
  
  public Mono&lt;ActionFact&gt; methodToReadFromCache(actionFact) {
      return Mono.fromCallable(() -&gt; getKey(actionFact))
                  .flatMap(cacheKey -&gt;
                    redisOperations.hasKey(key)
                                  .flatMap(aBoolean -&gt; {
                                      if (aBoolean) {
                                          return redisOperations.opsForValue().get(cacheKey);
                                      }
                                      return authzService.getRolePermissions(actionFact)
                                              .flatMap(policySetResponse -&gt;
                                                      //save in cache
                                              );
                                  })
                                  .elapsed()
                                  .flatMap(lambda -&gt; {
                                      LOG.info("cache/service processing key:{}, time:{}", key, lambda.getT1());
                                      return Mono.just(lambda.getT2());
                                  });
  </code></pre>
  
  <p>Output:</p>
  
  <pre><code>cache/service processing key:KEY1, time:3 
  cache/service processing key:KEY2, time:4 
  cache/service processing key:KEY3, time:18 
  cache/service processing key:KEY4, time:34 
  cache/service processing key:KEY5, time:46 
  cache/service processing key:KEY6, time:57 
  cache/service processing key:KEY7, time:70 
  cache/service processing key:KEY8, time:81 
  cache/service processing key:KEY9, time:91 
  cache/service processing key:KEY10, time:103
  cache/service processing key:KEY11, time:112
  cache/service processing key:KEY12, time:121
  cache/service processing key:KEY13, time:134
  cache/service processing key:KEY14, time:146
  cache/service processing key:KEY15, time:159
  </code></pre>
  
  <p>I am expecting that time taken for each of the cache request will be &lt;5 milliseconds like first and second request but not the case. Does <code>elapsed()</code> add current fetching time to the cummulative? As per my understanding each item emmitted from flux is independent? </p>