Skip to content

Commit

Permalink
ceph_erasure_code_benchmark: use 32-byte aligned input
Browse files Browse the repository at this point in the history
The benchmark is supposed to measure the encoding/decoding speed and
not the overhead of buffer realignments.

Signed-off-by: Janne Grunau <[email protected]>
  • Loading branch information
jannau authored and Loic Dachary committed Oct 21, 2014
1 parent fdeeeb1 commit abc1cfb
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/test/erasure-code/ceph_erasure_code_benchmark.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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++) {
Expand Down

0 comments on commit abc1cfb

Please sign in to comment.