dev
This commit is contained in:
parent
8d0c03c8f6
commit
d9a75cf8cf
2 changed files with 13 additions and 3 deletions
|
|
@ -419,8 +419,17 @@ Everything after that is bound to *command-line-args*."))
|
||||||
|
|
||||||
(defn -main
|
(defn -main
|
||||||
[& args]
|
[& args]
|
||||||
|
(if-let [dev-opts (System/getenv "BABASHKA_DEV")]
|
||||||
|
(let [{:keys [:n]} (edn/read-string dev-opts)
|
||||||
|
last-iteration (dec n)]
|
||||||
|
(dotimes [i n]
|
||||||
|
(if (< i last-iteration)
|
||||||
|
(with-out-str (apply main args))
|
||||||
|
(do (apply main args)
|
||||||
|
(binding [*out* *err*]
|
||||||
|
(println "ran" n "times"))))))
|
||||||
(let [exit-code (apply main args)]
|
(let [exit-code (apply main args)]
|
||||||
(System/exit exit-code)))
|
(System/exit exit-code))))
|
||||||
|
|
||||||
;;;; Scratch
|
;;;; Scratch
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -8,5 +8,6 @@
|
||||||
(require '[clj-async-profiler.core :as prof])
|
(require '[clj-async-profiler.core :as prof])
|
||||||
|
|
||||||
(defn -main [& options]
|
(defn -main [& options]
|
||||||
(prof/profile (apply main/main options))
|
(prof/profile (dotimes [_ 100]
|
||||||
|
(apply main/main options)))
|
||||||
(shutdown-agents))
|
(shutdown-agents))
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue