]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph_test_objectstore: randomly vary object size and write size hints
authorSage Weil <sage@redhat.com>
Mon, 6 Jun 2016 18:30:45 +0000 (14:30 -0400)
committerSage Weil <sage@redhat.com>
Wed, 15 Jun 2016 19:25:29 +0000 (15:25 -0400)
Signed-off-by: Sage Weil <sage@redhat.com>
src/test/objectstore/store_test.cc

index 3e3a391a9366525819bf0fcb9f1eba23d28eb38a..08d4b24d65141a77931ff4e85e711f2f5ad02c8f 100644 (file)
@@ -3196,7 +3196,12 @@ public:
     available_objects.erase(new_obj);
     ObjectStore::Transaction *t = new ObjectStore::Transaction;
     t->touch(cid, new_obj);
-    t->set_alloc_hint(cid, new_obj, 0, 0, get_random_alloc_hints());
+    boost::uniform_int<> u(17, 22);
+    boost::uniform_int<> v(12, 17);
+    t->set_alloc_hint(cid, new_obj,
+                     1ull << u(*rng),
+                     1ull << v(*rng),
+                     get_random_alloc_hints());
     ++in_flight;
     in_flight_objects.insert(new_obj);
     if (!contents.count(new_obj))