]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
common/obj_bencher.cc: faster object name generation 7863/head
authorPiotr Dałek <piotr.dalek@ts.fujitsu.com>
Tue, 1 Mar 2016 12:25:36 +0000 (13:25 +0100)
committerPiotr Dałek <piotr.dalek@ts.fujitsu.com>
Tue, 1 Mar 2016 12:47:10 +0000 (13:47 +0100)
commit42d81bffc4d57bceb98872dadc8e57400981588c
treeff40027c29f587d477113237edbe8a677082da5d
parent8c054f741a8102271c3b9ccf6f459210cf40f71e
common/obj_bencher.cc: faster object name generation

generate_object_name() uses std::ostringstream to build object name
and calls generate_object_prefix() (which uses another std::ostringstream),
making it quite inefficient and actually being one of limiting factors
in small-object benchmarks. New version that does everything on one char
array and within one function is up to 3,8x faster (in my testing bumping
throughput from 35MB/s to 40MB/s on rados bench rand -t 128 on 1KB objects).

Signed-off-by: Piotr Dałek <piotr.dalek@ts.fujitsu.com>
src/common/obj_bencher.cc