mirror of
https://github.com/logseq/logseq.git
synced 2026-05-25 21:24:21 +00:00
14 lines
304 B
Clojure
14 lines
304 B
Clojure
(ns frontend.util)
|
|
|
|
;; Copied from https://github.com/tonsky/datascript-todo
|
|
(defmacro profile [k & body]
|
|
`(if goog.DEBUG
|
|
(let [k# ~k]
|
|
(.time js/console k#)
|
|
(let [res# (do ~@body)]
|
|
(.timeEnd js/console k#)
|
|
res#))
|
|
(do ~@body)))
|
|
|
|
;; TODO: profile and profileEnd
|