Skip to content
Browse files

don't flush null values

  • Loading branch information...
1 parent dfa0148 commit 0e19bad4609d04a1092f60dacc437b6d26406ed4 @paulasmuth committed
Showing with 6 additions and 2 deletions.
  1. +6 −2 fnordmetric-enterprise/src/AbstractBucket.scala
View
8 fnordmetric-enterprise/src/AbstractBucket.scala
@@ -16,13 +16,17 @@ trait AbstractBucket {
def flush_every(interval: Long, proc: (Long, Double) => Unit) = {
val now = FnordMetric.now
+ var triggered = (next_flush == 0)
- if (next_flush == 0)
+ if (triggered)
next_flush = now
while (next_flush <= now) {
- proc(next_flush, flush)
+ if (!triggered)
+ proc(next_flush, flush)
+
next_flush += interval
+ triggered = true
}
}

0 comments on commit 0e19bad

Please sign in to comment.
Something went wrong with that request. Please try again.