Calculate count of subscription traces
This commit is contained in:
parent
9454eb1baf
commit
11954d99b1
|
@ -1,9 +1,11 @@
|
|||
(ns day8.re-frame.trace.preload
|
||||
(:require [day8.re-frame.trace :as trace]))
|
||||
(:require [day8.re-frame.trace :as trace]
|
||||
[mranderson047.re-frame.v0v10v2.re-frame.core :as rf]))
|
||||
|
||||
|
||||
;; Use this namespace with the :preloads compiler option to perform the necessary setup for enabling tracing:
|
||||
;; {:compiler {:preloads [day8.re-frame.trace.preload] ...}}
|
||||
(rf/clear-subscription-cache!)
|
||||
(trace/init-db!)
|
||||
(defonce _ (trace/init-tracing!))
|
||||
(trace/inject-devtools!)
|
||||
|
|
|
@ -517,32 +517,32 @@
|
|||
:<- [:subs/visible-subs]
|
||||
(fn [subs _]
|
||||
(->> subs
|
||||
(map :type)
|
||||
(mapcat :order)
|
||||
(frequencies))))
|
||||
|
||||
(rf/reg-sub
|
||||
:subs/created-count
|
||||
:<- [:subs/sub-counts]
|
||||
(fn [counts]
|
||||
(get counts :created 0)))
|
||||
(get counts :sub/create 0)))
|
||||
|
||||
(rf/reg-sub
|
||||
:subs/re-run-count
|
||||
:<- [:subs/sub-counts]
|
||||
(fn [counts]
|
||||
(get counts :re-run 0)))
|
||||
(get counts :sub/run 0)))
|
||||
|
||||
(rf/reg-sub
|
||||
:subs/destroyed-count
|
||||
:<- [:subs/sub-counts]
|
||||
(fn [counts]
|
||||
(get counts :destroyed 0)))
|
||||
(get counts :sub/dispose 0)))
|
||||
|
||||
(rf/reg-sub
|
||||
:subs/not-run-count
|
||||
:<- [:subs/sub-counts]
|
||||
(fn [counts]
|
||||
(get counts :not-run 0)))
|
||||
(get counts :sub/not-run 0)))
|
||||
|
||||
(rf/reg-sub
|
||||
:subs/unchanged-l2-subs-count
|
||||
|
|
Loading…
Reference in New Issue