Add stress-data-comparable, stress-data-benchable
This commit is contained in:
parent
f40e5f38ac
commit
42950ec24a
3 changed files with 11 additions and 5 deletions
|
|
@ -567,6 +567,15 @@
|
||||||
:exception (try (/ 1 0) (catch Exception e e))
|
:exception (try (/ 1 0) (catch Exception e e))
|
||||||
:ex-info (ex-info "ExInfo" {:data "data"})}))
|
:ex-info (ex-info "ExInfo" {:data "data"})}))
|
||||||
|
|
||||||
|
(def stress-data-comparable
|
||||||
|
"Reference data with stuff removed that breaks roundtrip equality."
|
||||||
|
(dissoc stress-data :bytes :throwable :exception :ex-info))
|
||||||
|
|
||||||
|
(def stress-data-benchable
|
||||||
|
"Reference data with stuff removed that breaks reader or other utils we'll
|
||||||
|
be benching against."
|
||||||
|
(dissoc stress-data :bytes :throwable :exception :ex-info :queue :queue-empty))
|
||||||
|
|
||||||
;;;; Data recovery/analysis
|
;;;; Data recovery/analysis
|
||||||
|
|
||||||
(defn inspect-ba "Alpha - subject to change."
|
(defn inspect-ba "Alpha - subject to change."
|
||||||
|
|
|
||||||
|
|
@ -5,8 +5,7 @@
|
||||||
[taoensso.nippy.compression :as compression]
|
[taoensso.nippy.compression :as compression]
|
||||||
[taoensso.nippy.utils :as utils]))
|
[taoensso.nippy.utils :as utils]))
|
||||||
|
|
||||||
;; Remove stuff from stress-data that breaks reader
|
(def data nippy/stress-data-benchable)
|
||||||
(def data (dissoc nippy/stress-data :queue :queue-empty :bytes))
|
|
||||||
|
|
||||||
(defmacro bench* [& body] `(utils/bench 10000 {:warmup-laps 20000} ~@body))
|
(defmacro bench* [& body] `(utils/bench 10000 {:warmup-laps 20000} ~@body))
|
||||||
(defn bench1 [freezer thawer & [sizer]]
|
(defn bench1 [freezer thawer & [sizer]]
|
||||||
|
|
|
||||||
|
|
@ -4,9 +4,7 @@
|
||||||
[taoensso.nippy.compression :as compression]
|
[taoensso.nippy.compression :as compression]
|
||||||
[taoensso.nippy.benchmarks :as benchmarks]))
|
[taoensso.nippy.benchmarks :as benchmarks]))
|
||||||
|
|
||||||
;; Remove stuff from stress-data that breaks roundtrip equality
|
(def test-data nippy/stress-data-comparable)
|
||||||
(def test-data (dissoc nippy/stress-data :bytes :throwable :exception :ex-info))
|
|
||||||
|
|
||||||
(defn- before-run {:expectations-options :before-run} [])
|
(defn- before-run {:expectations-options :before-run} [])
|
||||||
(defn- after-run {:expectations-options :after-run} [])
|
(defn- after-run {:expectations-options :after-run} [])
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue