influxdb-csharp
influxdb-csharp copied to clipboard
Reduce allocations for single point emission
Most of the time, points are collected one by one by using one of the public methods of MetricsCollector
. For every collected point however, an array has to be allocated because all the points go through the IPointEmitter.Emit(PointData[] points)
method.
I propose to add a method virtual Emit(PointData point)
to MetricsCollector
that can be overriden by subclasses. The default implementation can simply delegate to the array accepting method.