Skip to content

Commit

Permalink
Make skip prefixes apply after only prefixes
Browse files Browse the repository at this point in the history
  • Loading branch information
jpmonettas committed Nov 7, 2023
1 parent 1bf46b4 commit ab14929
Showing 1 changed file with 11 additions and 15 deletions.
26 changes: 11 additions & 15 deletions src/main/clojure/cljs/storm/emitter.cljc
Original file line number Diff line number Diff line change
Expand Up @@ -33,19 +33,15 @@

(defn skip-instrumentation? [ns-symb]
(let [nsname (str ns-symb)
prefixes-instrument (if (seq instrument-only-prefixes)
;; if there are instrument onlys, lets see if any
;; of them applies for this fq-fn-name
(some (fn [p]
(str/starts-with? nsname p))
instrument-only-prefixes)

;; else, if there are skips lets see if we shouldn't skip
;; this fq-fn-name
(not
(some (fn [p]
(str/starts-with? nsname p))
instrument-skip-prefixes)))]
instrument? false
instrument? (reduce (fn [inst? p]
(or inst? (str/starts-with? nsname p)))
instrument?
instrument-only-prefixes)
instrument? (reduce (fn [inst? p]
(and inst? (not (str/starts-with? nsname p))))
instrument?
instrument-skip-prefixes)]
;; skip iff
(not (and instrument-enable
prefixes-instrument))))
(or (not instrument-enable)
(not instrument?))))

0 comments on commit ab14929

Please sign in to comment.