From e9403bb6364152af447080d41a35891f8d75ff30 Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Sun, 17 Mar 2019 00:15:52 -0400 Subject: Now only timing compiler operations in the Leiningen plugin. --- lux-lein/src/leiningen/lux/builder.clj | 10 +++++----- lux-lein/src/leiningen/lux/packager.clj | 2 +- lux-lein/src/leiningen/lux/test.clj | 18 +++++++++--------- 3 files changed, 15 insertions(+), 15 deletions(-) (limited to 'lux-lein') diff --git a/lux-lein/src/leiningen/lux/builder.clj b/lux-lein/src/leiningen/lux/builder.clj index eeb1cead7..ebfbc7895 100644 --- a/lux-lein/src/leiningen/lux/builder.clj +++ b/lux-lein/src/leiningen/lux/builder.clj @@ -6,10 +6,10 @@ (defn build [project] (if-let [program-module (get-in project [:lux :program])] - (when (&utils/run-process (&utils/compile-path project program-module (get project :source-paths (list))) - nil - "[COMPILATION BEGAN]" - "[COMPILATION ENDED]") - (&packager/package project program-module (get project :resource-paths (list))) + (when (time (&utils/run-process (&utils/compile-path project program-module (get project :source-paths (list))) + nil + "[COMPILATION BEGAN]" + "[COMPILATION ENDED]")) + (time (&packager/package project program-module (get project :resource-paths (list)))) true) (println missing-module-error))) diff --git a/lux-lein/src/leiningen/lux/packager.clj b/lux-lein/src/leiningen/lux/packager.clj index eafa4ed06..7f80b1763 100644 --- a/lux-lein/src/leiningen/lux/packager.clj +++ b/lux-lein/src/leiningen/lux/packager.clj @@ -231,4 +231,4 @@ (defn package "(-> Text Text (List Text) Null)" [project module resources-dirs] - (time (package-jvm project module resources-dirs))) + (package-jvm project module resources-dirs)) diff --git a/lux-lein/src/leiningen/lux/test.clj b/lux-lein/src/leiningen/lux/test.clj index 3ecfcbe6e..84ba33d58 100644 --- a/lux-lein/src/leiningen/lux/test.clj +++ b/lux-lein/src/leiningen/lux/test.clj @@ -8,19 +8,19 @@ (defn test [project] (if-let [test-module (get-in project [:lux :test])] - (when (&utils/run-process (&utils/compile-path project test-module (concat (:test-paths project) (:source-paths project))) - nil - "[COMPILATION BEGAN]" - "[COMPILATION ENDED]") + (when (time (&utils/run-process (&utils/compile-path project test-module (concat (:test-paths project) (:source-paths project))) + nil + "[COMPILATION BEGAN]" + "[COMPILATION ENDED]")) (let [java-cmd (get project :java-cmd "java") jvm-opts (->> (get project :jvm-opts) (interpose " ") (reduce str "")) output-package (str (get project :target-path &utils/default-target-dir) java.io.File/separator (get project :jar-name &utils/output-package))] - (do (&packager/package project test-module (get project :resource-paths (list))) - (&utils/run-process (str java-cmd " " jvm-opts " -jar " output-package) - nil - "[TESTING BEGAN]" - "[TESTING ENDED]") + (do (time (&packager/package project test-module (get project :resource-paths (list)))) + (time (&utils/run-process (str java-cmd " " jvm-opts " -jar " output-package) + nil + "[TESTING BEGAN]" + "[TESTING ENDED]")) true))) (println missing-module-error))) -- cgit v1.2.3