[TT-15243] InfluxDB 2 Pump does not include Latency.Total and Latency.Uptime #881
+89
−14
probelabs / Visor: performance
succeeded
Oct 8, 2025 in 4m 54s
✅ Check Passed
performance check completed successfully with no issues found.
Details
📊 Summary
- Total Issues: 1
🐛 Issues by Category
⚡ Performance (1)
- ℹ️ pumps/influx2.go:194 - A new map
mappingis created for each analytic record inside the loop. For high-throughput scenarios where thedataslice can contain many records, this leads to frequent memory allocations and increases pressure on the garbage collector, potentially degrading performance.
Generated by Visor - AI-powered code review
Annotations
Check notice on line 213 in pumps/influx2.go
probelabs / Visor: performance
performance Issue
A new map `mapping` is created for each analytic record inside the loop. For high-throughput scenarios where the `data` slice can contain many records, this leads to frequent memory allocations and increases pressure on the garbage collector, potentially degrading performance.
Raw output
To optimize memory usage and reduce GC overhead, consider using a pool of maps (e.g., `sync.Pool`) to reuse map allocations. A map can be acquired from the pool at the start of the loop iteration and released back to the pool at the end after it's been used. This is a common pattern for optimizing hot loops that process batches of data.
Loading