twitter/finagle — pull request #329 by whiter4bbit (2014-12-20 03:14:06+00:00)
Title: Update statistics for org.jboss.netty.channel.FileRegion writes

Handle FileRegion writes in ChannelStatsHandler

### Problem

Currently, when writing instance of `FileRegion` (in custom Codec for example), handler logs many annoying messages:
```
WAR [20141220-05:51:59.151] channel: ChannelStatsHandler received non-channelbuffer write
```
And sent bytes count from FileRegion not included in `sent_bytes` counter.

### Solution

Check if message is instance of `FileRegion` and increment stats counters by `FileRegion.getCount` value

### Result

Sent bytes from FileRegion are included in `sent_bytes` and `connection_sent_bytes` counters