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))
|
||||
: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
|
||||
|
||||
(defn inspect-ba "Alpha - subject to change."
|
||||
|
|
|
|||
|
|
@ -5,8 +5,7 @@
|
|||
[taoensso.nippy.compression :as compression]
|
||||
[taoensso.nippy.utils :as utils]))
|
||||
|
||||
;; Remove stuff from stress-data that breaks reader
|
||||
(def data (dissoc nippy/stress-data :queue :queue-empty :bytes))
|
||||
(def data nippy/stress-data-benchable)
|
||||
|
||||
(defmacro bench* [& body] `(utils/bench 10000 {:warmup-laps 20000} ~@body))
|
||||
(defn bench1 [freezer thawer & [sizer]]
|
||||
|
|
|
|||
|
|
@ -4,9 +4,7 @@
|
|||
[taoensso.nippy.compression :as compression]
|
||||
[taoensso.nippy.benchmarks :as benchmarks]))
|
||||
|
||||
;; Remove stuff from stress-data that breaks roundtrip equality
|
||||
(def test-data (dissoc nippy/stress-data :bytes :throwable :exception :ex-info))
|
||||
|
||||
(def test-data nippy/stress-data-comparable)
|
||||
(defn- before-run {:expectations-options :before-run} [])
|
||||
(defn- after-run {:expectations-options :after-run} [])
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue