mirror of
https://github.com/metosin/reitit.git
synced 2025-12-21 18:11:12 +00:00
fix perf tests
This commit is contained in:
parent
3aae55bd8c
commit
a9c33de7d1
1 changed files with 9 additions and 8 deletions
|
|
@ -70,11 +70,12 @@
|
||||||
nil routes))
|
nil routes))
|
||||||
|
|
||||||
(def trie-matcher
|
(def trie-matcher
|
||||||
|
(trie/matcher
|
||||||
(trie/compile
|
(trie/compile
|
||||||
(reduce
|
(reduce
|
||||||
(fn [acc [p d]]
|
(fn [acc [p d]]
|
||||||
(trie/insert acc p d))
|
(trie/insert acc p d))
|
||||||
nil routes)))
|
nil routes))))
|
||||||
|
|
||||||
(defn bench! []
|
(defn bench! []
|
||||||
|
|
||||||
|
|
@ -114,7 +115,7 @@
|
||||||
;; 0.30µs (iterate arrays)
|
;; 0.30µs (iterate arrays)
|
||||||
;; 0.28µs (list-params)
|
;; 0.28µs (list-params)
|
||||||
(cc/quick-bench
|
(cc/quick-bench
|
||||||
(trie/matcher trie-matcher "/v1/orgs/1/topics")))
|
(trie-matcher "/v1/orgs/1/topics")))
|
||||||
|
|
||||||
(comment
|
(comment
|
||||||
(bench!))
|
(bench!))
|
||||||
|
|
@ -123,6 +124,6 @@
|
||||||
|
|
||||||
(comment
|
(comment
|
||||||
(p/lookup pedestal-tree "/v1/orgs/1/topics")
|
(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"))
|
#_(segment/lookup segment-matcher "/v1/orgs/1/topics"))
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue