kazeburo/Plack-Middleware-ServerStatus-Lite — pull request #4 by kgoess (2012-08-17 03:22:45+00:00)
Title: patch to allow counting of bytes sent

Hi there, here is a fork with new code that would allow counting and reporting of the bytes sent.

I changed the behavior of your code so that it counts the current request as it is finishing, instead of as it is beginning. It made counting the bytes simpler and I didn't think it was that important, correct me if I'm wrong.

The byte counter wraps around to zero at 2**53 bytes. I explained why in the docs.

The unit test coverage I added was minimal, let me know if you think it should be more extensive.

I changed t/05_counter.t removing the requirement for Cache::FastMmap, which doesn't seem to be used anywhere currently, so the test would have been always skipping up until now. I also changed the test a little so that it will pass if *both* starman and starlet are installed, maybe that wasn't necessary.

Let me know what you think. And let me know if you are *not* going to release this soon, since we'd like to use the new code if you're not going to push a release with it, we'll release our own version internally.

Thanks!