mirror of
https://github.com/metosin/reitit.git
synced 2025-12-23 18:41:11 +00:00
Cleanup & fix perf test
This commit is contained in:
parent
1835ffc681
commit
5f1d6a61a6
4 changed files with 4 additions and 5 deletions
|
|
@ -93,7 +93,7 @@
|
|||
|
||||
;; 2.4µs (-84%)
|
||||
(title "pedestal - map-tree => prefix-tree")
|
||||
(let [call #(pedestal/find-route pedestal-routes {:path-info "/workspace/1/1" :request-method :get})]
|
||||
(let [call #(pedestal/find-route pedestal-router {:path-info "/workspace/1/1" :request-method :get})]
|
||||
(assert (call))
|
||||
(cc/quick-bench
|
||||
(call)))
|
||||
|
|
|
|||
|
|
@ -90,7 +90,7 @@
|
|||
"Creates a [[LinearRouter]] from routes and optional options.
|
||||
See [[router]] for available options"
|
||||
([routes]
|
||||
(linear-router routes {}))
|
||||
(linear-router routes {}))
|
||||
([routes {:keys [compile]}]
|
||||
(let [compiled (map (partial compile-route compile) routes)]
|
||||
(->LinearRouter
|
||||
|
|
@ -118,7 +118,7 @@
|
|||
"Creates a [[LookupRouter]] from routes and optional options.
|
||||
See [[router]] for available options"
|
||||
([routes]
|
||||
(lookup-router routes {}))
|
||||
(lookup-router routes {}))
|
||||
([routes {:keys [compile]}]
|
||||
(let [compiled (map (partial compile-route compile) routes)]
|
||||
(when-let [route (some impl/contains-wilds? (map first routes))]
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
;
|
||||
; You must not remove this notice, or any other, from this software.
|
||||
|
||||
(ns reitit.impl
|
||||
(ns ^:no-doc reitit.impl
|
||||
(:require [clojure.string :as str]
|
||||
[clojure.set :as set])
|
||||
(:import #?(:clj (java.util.regex Pattern))))
|
||||
|
|
|
|||
|
|
@ -119,4 +119,3 @@
|
|||
:path "/api/user/1/2"
|
||||
:params {:id "1", :sub-id "2"}})
|
||||
(reitit/match-by-path router "/api/user/1/2"))))))
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue