utilities/tp-link-to-influxdb#1: Batch InfluxDB writes



Issue Information

Issue Type: issue
Status: closed
Reported By: btasker
Assigned To: btasker

Milestone: v0.23
Created: 03-Sep-22 23:08



Description

Currently we write points to output one at a time.

It'd be far better to batch into a single write.



Toggle State Changes

Activity


assigned to @btasker

Points are now collected into a list and a single write is performed (per output).

We're actually doing it the more inefficient way round at the moment though - we iterate over outputs and have to construct a points buffer for each.

Iterating over outputs first was the more efficient approach the way we were doing it before, but really it now needs turning on it's head.

verified

mentioned in commit github-mirror/tplink_to_influxdb@67aa0fd3b003c2261191e3ab30cdc7980313aad8

Commit: github-mirror/tplink_to_influxdb@67aa0fd3b003c2261191e3ab30cdc7980313aad8 
Author: B Tasker                            
                            
Date: 2022-09-06T14:44:00.000+01:00 

Message

Batch points into a single write for utilities/tp-link-to-influxdb#1

Points will be pushed into a list and then a single write made.

+25 -17 (42 lines changed)
verified

mentioned in commit github-mirror/tplink_to_influxdb@36e2640f0a73345b0cf15ca46b3fe71737bdf279

Commit: github-mirror/tplink_to_influxdb@36e2640f0a73345b0cf15ca46b3fe71737bdf279 
Author: B Tasker                            
                            
Date: 2022-09-06T14:55:47.000+01:00 

Message

Change order of processing so that we only need to construct a list of datapoints once, rather than once per output (utilities/tp-link-to-influxdb#1)

+19 -18 (37 lines changed)