mirror of
https://github.com/boostorg/unordered.git
synced 2025-07-30 03:17:15 +02:00
added stats to the rest of open-addressing containers
This commit is contained in:
@ -72,6 +72,10 @@ namespace boost {
|
|||||||
using iterator = typename table_type::iterator;
|
using iterator = typename table_type::iterator;
|
||||||
using const_iterator = typename table_type::const_iterator;
|
using const_iterator = typename table_type::const_iterator;
|
||||||
|
|
||||||
|
#if defined(BOOST_UNORDERED_ENABLE_STATS)
|
||||||
|
using stats = typename table_type::stats;
|
||||||
|
#endif
|
||||||
|
|
||||||
unordered_flat_set() : unordered_flat_set(0) {}
|
unordered_flat_set() : unordered_flat_set(0) {}
|
||||||
|
|
||||||
explicit unordered_flat_set(size_type n, hasher const& h = hasher(),
|
explicit unordered_flat_set(size_type n, hasher const& h = hasher(),
|
||||||
@ -474,6 +478,15 @@ namespace boost {
|
|||||||
|
|
||||||
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
|
||||||
///
|
///
|
||||||
|
|
||||||
|
@ -115,6 +115,10 @@ namespace boost {
|
|||||||
using insert_return_type =
|
using insert_return_type =
|
||||||
detail::foa::insert_return_type<iterator, node_type>;
|
detail::foa::insert_return_type<iterator, node_type>;
|
||||||
|
|
||||||
|
#if defined(BOOST_UNORDERED_ENABLE_STATS)
|
||||||
|
using stats = typename table_type::stats;
|
||||||
|
#endif
|
||||||
|
|
||||||
unordered_node_map() : unordered_node_map(0) {}
|
unordered_node_map() : unordered_node_map(0) {}
|
||||||
|
|
||||||
explicit unordered_node_map(size_type n, hasher const& h = hasher(),
|
explicit unordered_node_map(size_type n, hasher const& h = hasher(),
|
||||||
@ -749,6 +753,15 @@ namespace boost {
|
|||||||
|
|
||||||
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
|
||||||
///
|
///
|
||||||
|
|
||||||
|
@ -105,6 +105,10 @@ namespace boost {
|
|||||||
using insert_return_type =
|
using insert_return_type =
|
||||||
detail::foa::insert_return_type<iterator, node_type>;
|
detail::foa::insert_return_type<iterator, node_type>;
|
||||||
|
|
||||||
|
#if defined(BOOST_UNORDERED_ENABLE_STATS)
|
||||||
|
using stats = typename table_type::stats;
|
||||||
|
#endif
|
||||||
|
|
||||||
unordered_node_set() : unordered_node_set(0) {}
|
unordered_node_set() : unordered_node_set(0) {}
|
||||||
|
|
||||||
explicit unordered_node_set(size_type n, hasher const& h = hasher(),
|
explicit unordered_node_set(size_type n, hasher const& h = hasher(),
|
||||||
@ -563,6 +567,15 @@ namespace boost {
|
|||||||
|
|
||||||
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
|
||||||
///
|
///
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user