title: How do I make "simple" throughput servlet-filter?
body: <p>I'm looking to create a filter that can give me two things: number of request pr minute, and average responsetime pr minute. I already got the individual readings, I'm just not sure how to add them up. </p>
  
  <p>My filter captures every request, and it records the time each request takes:</p>
  
  <pre><code>public void doFilter(ServletRequest request, ...()  
  {       
      long start = System.currentTimeMillis(); 
      chain.doFilter(request, response);
      long stop = System.currentTimeMillis();
  
      String time = Util.getTimeDifferenceInSec(start, stop);
  }
  </code></pre>
  
  <p>This information will be used to create some pretty Google Chart charts. I don't want to store the data in any database. Just a way to get current numbers out when requested</p>
  
  <p>As this is a high volume application; low overhead is essential. </p>
  
  <p>I'm assuming my applicationserver doesn't provide this information. </p>