peschuster/graphite-client — pull request #14 by peschuster (2014-02-18 11:51:01+00:00)
Title: Overflow when sending performance counters values larger than int.MaxValue

Hello,
In Kernel.cs (https://github.com/peschuster/graphite-client/blob/master/source/Graphite.System/Kernel.cs#L137), a float value is casted into an int value. This leads to an overflow when reporting values larger than int.MaxValue; the behavior in this case being to report a value equal to int.MinValue. For some counters such as GC gen2 size, this might be problematic.

A best effort fix would be to cast this value to a long, even though it seems that the only use of this is to format the value to send it to Graphite or StatsD, which might be achievable (I'm no expert at the protocol) via a simple float truncation.

Anyway, thanks for your tool, which might be really useful for me as soon as this is fixed !