-
Notifications
You must be signed in to change notification settings - Fork 107
performance optimization: concrete impls for NumericMessage #286
Open
Description
We've noticed an excessive number of Double boxings when recording histogram metrics. They land in https://github.com/DataDog/java-dogstatsd-client/blob/master/src/main/java/com/timgroup/statsd/NonBlockingStatsDClient.java#L522
which is a generic version of https://github.com/DataDog/java-dogstatsd-client/blob/master/src/main/java/com/timgroup/statsd/NumericMessage.java
The value is always boxed as a result of the Double.of call.
It would greatly reduce object allocations if there was a concrete non-generic implementation of NumericMessage for each of the types it supports (int, long and double), and then used by the histogram feature. Arguably just long and double impls should be enough.
Metadata
Metadata
Assignees
Labels
No labels
Type
Fields
Give feedbackNo fields configured for issues without a type.