mirror of
https://github.com/boostorg/unordered.git
synced 2025-07-30 03:17:15 +02:00
added stats to boost::concurrent_flat_map
This commit is contained in:
@ -1,7 +1,7 @@
|
|||||||
/* Fast open-addressing concurrent hashmap.
|
/* Fast open-addressing concurrent hashmap.
|
||||||
*
|
*
|
||||||
* Copyright 2023 Christian Mazakas.
|
* Copyright 2023 Christian Mazakas.
|
||||||
* Copyright 2023 Joaquin M Lopez Munoz.
|
* Copyright 2023-2024 Joaquin M Lopez Munoz.
|
||||||
* Distributed under the Boost Software License, Version 1.0.
|
* Distributed under the Boost Software License, Version 1.0.
|
||||||
* (See accompanying file LICENSE_1_0.txt or copy at
|
* (See accompanying file LICENSE_1_0.txt or copy at
|
||||||
* http://www.boost.org/LICENSE_1_0.txt)
|
* http://www.boost.org/LICENSE_1_0.txt)
|
||||||
@ -75,6 +75,10 @@ namespace boost {
|
|||||||
typename boost::allocator_const_pointer<allocator_type>::type;
|
typename boost::allocator_const_pointer<allocator_type>::type;
|
||||||
static constexpr size_type bulk_visit_size = table_type::bulk_visit_size;
|
static constexpr size_type bulk_visit_size = table_type::bulk_visit_size;
|
||||||
|
|
||||||
|
#if defined(BOOST_UNORDERED_ENABLE_STATS)
|
||||||
|
using stats = typename table_type::stats;
|
||||||
|
#endif
|
||||||
|
|
||||||
concurrent_flat_map()
|
concurrent_flat_map()
|
||||||
: concurrent_flat_map(detail::foa::default_bucket_count)
|
: concurrent_flat_map(detail::foa::default_bucket_count)
|
||||||
{
|
{
|
||||||
@ -714,6 +718,15 @@ namespace boost {
|
|||||||
void rehash(size_type n) { table_.rehash(n); }
|
void rehash(size_type n) { table_.rehash(n); }
|
||||||
void reserve(size_type n) { table_.reserve(n); }
|
void reserve(size_type n) { table_.reserve(n); }
|
||||||
|
|
||||||
|
#if defined(BOOST_UNORDERED_ENABLE_STATS)
|
||||||
|
/// Stats
|
||||||
|
///
|
||||||
|
|
||||||
|
stats get_stats() const { return table_.get_stats(); }
|
||||||
|
|
||||||
|
void reset_stats() { table_.reset_stats(); }
|
||||||
|
#endif
|
||||||
|
|
||||||
/// Observers
|
/// Observers
|
||||||
///
|
///
|
||||||
allocator_type get_allocator() const noexcept
|
allocator_type get_allocator() const noexcept
|
||||||
|
Reference in New Issue
Block a user