diff options
author | Alex Auvolat <alex@adnab.me> | 2023-04-19 15:59:30 +0200 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2023-10-18 12:03:11 +0200 |
commit | 0bb1577ae12b2dde313e036399f252266bc04d0a (patch) | |
tree | d45695a18af7bb7e8080b20897887af144ca7ee6 /script/jepsen.garage/src/jepsen/garage/set.clj | |
parent | 6eb26be548c08707b59473e6086f3f5eee89fe47 (diff) | |
download | garage-0bb1577ae12b2dde313e036399f252266bc04d0a.tar.gz garage-0bb1577ae12b2dde313e036399f252266bc04d0a.zip |
two set workloads with different checkers
Diffstat (limited to 'script/jepsen.garage/src/jepsen/garage/set.clj')
-rw-r--r-- | script/jepsen.garage/src/jepsen/garage/set.clj | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/script/jepsen.garage/src/jepsen/garage/set.clj b/script/jepsen.garage/src/jepsen/garage/set.clj index ab99e6ef..f8c92580 100644 --- a/script/jepsen.garage/src/jepsen/garage/set.clj +++ b/script/jepsen.garage/src/jepsen/garage/set.clj @@ -34,12 +34,12 @@ (grg/s3-put (:creds this) (str (:value op)) "present") (assoc op :type :ok)) :read - (let [items (grg/s3-list (:creds this))] + (let [items (grg/s3-list (:creds this) "")] (assoc op :type :ok, :value (set (map read-string items)))))) (teardown! [this test]) (close! [this test])) -(defn workload +(defn workload1 "Tests insertions and deletions" [opts] {:client (SetClient. nil) @@ -47,10 +47,18 @@ {:set (checker/set) :timeline (timeline/html)}) ; :generator (gen/mix [op-add op-read]) - ; :generator (->> (range) - ; (map (fn [x] {:type :invoke, :f :add, :value x}))) - :generator (gen/mix [op-read - (->> (range) (map (fn [x] {:type :invoke, :f :add, :value x})))]) + :generator (->> (range) + (map (fn [x] {:type :invoke, :f :add, :value x}))) :final-generator (gen/once op-read)}) +(defn workload2 + "Tests insertions and deletions" + [opts] + {:client (SetClient. nil) + :checker (checker/compose + {:set (checker/set-full {:linearizable? false}) + :timeline (timeline/html)}) + :generator (gen/mix [op-read + (->> (range) (map (fn [x] {:type :invoke, :f :add, :value x})))])}) + |