diff --git a/src/jmh/result.clj b/src/jmh/result.clj index b0bb355..893f2fd 100644 --- a/src/jmh/result.clj +++ b/src/jmh/result.clj @@ -79,16 +79,13 @@ secondary (reduce-kv (fn [m ^String k v] - (if-let [[_ pct] (re-find #"\u00b7p([\d.]+)$" k)] + (if-let [[_ pct] (re-matches #"p([\d.]+)" k)] (let [pct (* 100 (double (Double/valueOf ^String pct)))] (update m :percentiles assoc-sorted pct (edn v))) (if-let [b (benchmark-data k)] (update m :secondary assoc-sorted (:name b (:fn b)) (merge b (edn v))) - (let [kind (if (.startsWith k "\u00b7") - (subs k 1) - k)] - (update m :secondary assoc-sorted kind (edn v)))))) + (update m :secondary assoc-sorted k (edn v))))) {} (into {} (.getSecondaryResults r))) nprefix (count state/param-field-prefix) diff --git a/test/jmh/core_test.clj b/test/jmh/core_test.clj index 0e27fc0..fc7b552 100644 --- a/test/jmh/core_test.clj +++ b/test/jmh/core_test.clj @@ -64,10 +64,12 @@ (let [result (core/run test/sample-env (-> (assoc opts - ;; :status true, :verbose true + :status true, :verbose true + :profilers ["gc"] :fork {:count 1 :warmups 0}) (dissoc :mode)))] - ;; (binding [*print-meta* true] (prn result)) + (pp result) + (pp (meta result)) (is (= 11 (count result))) (is (= 9 (count (filter :index result)))))))