]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph_erasure_code_benchmark: use 32-byte aligned input
authorJanne Grunau <j@jannau.net>
Mon, 29 Sep 2014 12:34:32 +0000 (14:34 +0200)
committerLoic Dachary <loic-201408@dachary.org>
Tue, 21 Oct 2014 17:33:48 +0000 (10:33 -0700)
The benchmark is supposed to measure the encoding/decoding speed and
not the overhead of buffer realignments.

Signed-off-by: Janne Grunau <j@jannau.net>
src/test/erasure-code/ceph_erasure_code_benchmark.cc

index c6a4228bdc1e4a40f1fbf4fea120abc05bdf1809..71d22a7b24f5aedc1bee77308c33e3c72f199757 100644 (file)
@@ -144,6 +144,7 @@ int ErasureCodeBench::encode()
 
   bufferlist in;
   in.append(string(in_size, 'X'));
+  in.rebuild_aligned(32);
   set<int> want_to_encode;
   for (int i = 0; i < k + m; i++) {
     want_to_encode.insert(i);
@@ -183,6 +184,7 @@ int ErasureCodeBench::decode()
   }
   bufferlist in;
   in.append(string(in_size, 'X'));
+  in.rebuild_aligned(32);
 
   set<int> want_to_encode;
   for (int i = 0; i < k + m; i++) {