Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Revert "Revert "make sure we don't sample twice""

This reverts commit b2f3958.
  • Loading branch information...
commit 21b6a451f458bceb606de28383488613a3211204 1 parent b2f3958
@ztellman authored
Showing with 10 additions and 4 deletions.
  1. +10 −4 src/aleph/trace/operators.clj
View
14 src/aleph/trace/operators.clj
@@ -218,12 +218,16 @@
;;; group-by
-(defn group-by-op [chain-transform {:strs [options operators]} ch]
+(defn group-by-op [chain-transform
+ {:strs [options operators period]
+ :or {period 1000}}
+ ch]
;; handle both keywords and strings
- (let [operators (if (periodic-chain? operators)
+ (let [periodic-chain? (periodic-chain? operators)
+ expiration (get options "expiration" (* 1000 60))
+ operators (if periodic-chain?
operators
- (concat operators [{"name" "partition-every"}]))
- expiration (get options "expiration" (* 1000 30))
+ (concat operators [{"name" "partition-every", "options" {"period" period}}]))
facet (or
(get options "facet")
(get options "0"))]
@@ -279,6 +283,7 @@
(defoperator sample
:periodic? true
+ :post-split (fn [_ ch] ch)
(:endpoint :aggregator) (fn [{:strs [options]} ch]
(let [period (or
(get options "period")
@@ -288,6 +293,7 @@
(defoperator partition-every
:periodic? true
+ :post-split (fn [_ ch] ch)
(:endpoint :aggregator) (fn [{:strs [options]} ch]
(let [period (or
(get options "period")
Please sign in to comment.
Something went wrong with that request. Please try again.