From a9c33de7d172ce0228fb4f1ed7f86266c4d7e04a Mon Sep 17 00:00:00 2001 From: Tommi Reiman Date: Thu, 28 Feb 2019 10:19:21 +0200 Subject: [PATCH] fix perf tests --- perf-test/clj/reitit/prefix_tree_perf_test.clj | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/perf-test/clj/reitit/prefix_tree_perf_test.clj b/perf-test/clj/reitit/prefix_tree_perf_test.clj index 63da20d7..628f2ed8 100644 --- a/perf-test/clj/reitit/prefix_tree_perf_test.clj +++ b/perf-test/clj/reitit/prefix_tree_perf_test.clj @@ -70,11 +70,12 @@ nil routes)) (def trie-matcher - (trie/compile - (reduce - (fn [acc [p d]] - (trie/insert acc p d)) - nil routes))) + (trie/matcher + (trie/compile + (reduce + (fn [acc [p d]] + (trie/insert acc p d)) + nil routes)))) (defn bench! [] @@ -108,13 +109,13 @@ ;; 0.51µs (Cleanup) ;; 0.30µs (Java) #_(cc/quick-bench - (segment/lookup segment-matcher "/v1/orgs/1/topics")) + (segment/lookup segment-matcher "/v1/orgs/1/topics")) ;; 0.32µs (initial) ;; 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"))