fix perf tests

This commit is contained in:
Tommi Reiman 2019-02-28 10:19:21 +02:00
parent 3aae55bd8c
commit a9c33de7d1

View file

@ -70,11 +70,12 @@
nil routes))
(def trie-matcher
(trie/matcher
(trie/compile
(reduce
(fn [acc [p d]]
(trie/insert acc p d))
nil routes)))
nil routes))))
(defn bench! []
@ -114,7 +115,7 @@
;; 0.30µs (iterate arrays)
;; 0.28µs (list-params)
(cc/quick-bench
(trie/matcher trie-matcher "/v1/orgs/1/topics")))
(trie-matcher "/v1/orgs/1/topics")))
(comment
(bench!))
@ -123,6 +124,6 @@
(comment
(p/lookup pedestal-tree "/v1/orgs/1/topics")
(trie/matcher trie-matcher "/v1/orgs/1/topics")
(trie-matcher "/v1/orgs/1/topics")
#_(segment/lookup segment-matcher "/v1/orgs/1/topics"))