diff --git a/CHANGELOG.md b/CHANGELOG.md index f2a55f26..96aab02c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ ## Fixed - Fix beholder watch functionality that would cause a NullPointerException earlier. +- Resolve reflective calls in profiling plugin. ## Changed diff --git a/src/kaocha/plugin/profiling.clj b/src/kaocha/plugin/profiling.clj index ba8b3428..2c33fc6f 100644 --- a/src/kaocha/plugin/profiling.clj +++ b/src/kaocha/plugin/profiling.clj @@ -7,6 +7,8 @@ (:import java.time.Instant java.time.temporal.ChronoUnit)) +(set! *warn-on-reflection* true) + (spec/def ::start #(instance? Instant %)) (spec/def ::duration nat-int?) (spec/def ::profiling? boolean?) @@ -18,7 +20,7 @@ (defn stop [testable] (cond-> testable (::start testable) - (assoc ::duration (.until (::start testable) + (assoc ::duration (.until ^Instant (::start testable) (Instant/now) ChronoUnit/NANOS))))