influxdata / influxdb-csharp

A .NET library for efficiently sending points to InfluxDB 1.x
Apache License 2.0
199 stars 60 forks source link

Add compression to LineProtocolClient #81

Closed stmax82 closed 4 years ago

stmax82 commented 4 years ago

I added gzip compression to HTTP POST requests.

Quick tests have shown that it reduces Content-Length down to 50% (for short single point requests) and down to <10% (for large multi-point requests).

Compression can be enabled using an optional parameter of the LineProtocolClient constructor. Default is off so the behavior should be the same as before.

stmax82 commented 4 years ago

@bednar @nblumhardt could we get updates for the open pull requests please?

nblumhardt commented 4 years ago

@stmax82 I'm no longer a maintainer, here, sorry.

AppVeyorBot commented 4 years ago

:white_check_mark: Build influxdb-csharp 13 completed (commit https://github.com/influxdata/influxdb-csharp/commit/bb2babbb26 by @stmax82)

AppVeyorBot commented 4 years ago

:white_check_mark: Build influxdb-csharp 14 completed (commit https://github.com/influxdata/influxdb-csharp/commit/1bd9ce4fdc by @stmax82)

AppVeyorBot commented 4 years ago

:white_check_mark: Build influxdb-csharp 15 completed (commit https://github.com/influxdata/influxdb-csharp/commit/54b0ed1d55 by @stmax82)

stmax82 commented 4 years ago

Hi @bednar,

Could you please update CHANGELOG.md and add unit tests to cover your changes?

done - I updated the changelog and added a few tests for the LineProtocolClient with and without compression.

AppVeyorBot commented 4 years ago

:white_check_mark: Build influxdb-csharp 16 completed (commit https://github.com/influxdata/influxdb-csharp/commit/4902a06e78 by @stmax82)

AppVeyorBot commented 4 years ago

:white_check_mark: Build influxdb-csharp 17 completed (commit https://github.com/influxdata/influxdb-csharp/commit/aad4b8024e by @bednar)

bednar commented 4 years ago

Hi @stmax82 ,

The issue is fixed in 1.2.0 milestone.

If you would like to use a preview version use our nightly build: InfluxDB.LineProtocol 1.2.0-dev-00018.

Regards