]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
common: ceph::perf_counters::make_cache_key()
authorCasey Bodley <cbodley@redhat.com>
Wed, 17 Aug 2022 13:27:42 +0000 (09:27 -0400)
committerAli Maredia <amaredia@redhat.com>
Fri, 28 Oct 2022 12:23:05 +0000 (08:23 -0400)
commit7533c62e5d850a50ce7ff15fdb356d72a8d34a09
treee5b3ff022633d45e873c5d36b9216b727fcae2e0
parentbc11fa71d6e7f089cb7fc74a0dfc050e12cb39de
common: ceph::perf_counters::make_cache_key()

a flat representation of a set of prometheus labels, returned as a
std::string. this string can either be used for sorting an ordered
container of perf counters, or for hashing an unordered container

use a variadic template to initialize a temporary array for sorting

use rvalue-ref to c array instead of variadic template

Signed-off-by: Casey Bodley <cbodley@redhat.com>
src/common/perf_counters_cache_key.h [new file with mode: 0644]
src/test/common/CMakeLists.txt
src/test/common/test_perf_cache_key.cc [new file with mode: 0644]