Skip to content
This repository has been archived by the owner on Dec 8, 2023. It is now read-only.

Actually flush measurements batch when batch size is reached. #93

Merged
merged 1 commit into from
Jun 5, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/librato.js
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ var flushStats = function libratoFlush(ts, metrics) {
// Post measurements and clear arrays if past batch size
if (measurements.length >= maxBatchSize || writeToLegacy && counters.length + gauges.length >= maxBatchSize) {
postMetrics(measureTime, gauges, counters, measurements);
if (measurements >= maxBatchSize) {
if (measurements.length >= maxBatchSize) {
measurements = [];
}
if (counters.length + gauges.length >= maxBatchSize) {
Expand Down