From 5cd0079e7fbe6fb39540b4cc57c7093c957fda56 Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Tue, 6 Sep 2022 16:52:51 +0200 Subject: [PATCH] :paperclip: Add some utilities on user ns --- backend/dev/user.clj | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/backend/dev/user.clj b/backend/dev/user.clj index 7da07ecf0..43ec7d4da 100644 --- a/backend/dev/user.clj +++ b/backend/dev/user.clj @@ -10,6 +10,7 @@ [app.common.exceptions :as ex] [app.common.geom.matrix :as gmt] [app.common.perf :as perf] + [app.common.pprint :as pp] [app.common.transit :as t] [app.config :as cfg] [app.main :as main] @@ -35,6 +36,24 @@ (defonce system nil) +;; --- Benchmarking Tools + +(defmacro run-quick-bench + [& exprs] + `(with-progress-reporting (quick-bench (do ~@exprs) :verbose))) + +(defmacro run-quick-bench' + [& exprs] + `(quick-bench (do ~@exprs))) + +(defmacro run-bench + [& exprs] + `(with-progress-reporting (bench (do ~@exprs) :verbose))) + +(defmacro run-bench' + [& exprs] + `(bench (do ~@exprs))) + ;; --- Development Stuff (defn- run-tests