influxdb-csharp icon indicating copy to clipboard operation
influxdb-csharp copied to clipboard

Reduce allocations for single point emission

Open cypressious opened this issue 6 years ago • 0 comments

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.

cypressious avatar May 08 '18 10:05 cypressious