forked from boostorg/unordered
documented stats
This commit is contained in:
@@ -52,6 +52,8 @@ namespace boost {
|
||||
using node_type = _implementation-defined_;
|
||||
using insert_return_type = _implementation-defined_;
|
||||
|
||||
using stats = xref:stats_stats_type[__stats-type__]; // if statistics are xref:unordered_node_set_boost_unordered_enable_stats[enabled]
|
||||
|
||||
// construct/copy/destroy
|
||||
xref:#unordered_node_set_default_constructor[unordered_node_set]();
|
||||
explicit xref:#unordered_node_set_bucket_count_constructor[unordered_node_set](size_type n,
|
||||
@@ -176,6 +178,10 @@ namespace boost {
|
||||
size_type xref:#unordered_node_set_max_load[max_load]() const noexcept;
|
||||
void xref:#unordered_node_set_rehash[rehash](size_type n);
|
||||
void xref:#unordered_node_set_reserve[reserve](size_type n);
|
||||
|
||||
// statistics (if xref:unordered_node_set_boost_unordered_enable_stats[enabled])
|
||||
stats xref:#unordered_node_set_get_stats[get_stats]() const;
|
||||
void xref:#unordered_node_set_reset_stats[reset_stats]() noexcept;
|
||||
};
|
||||
|
||||
// Deduction Guides
|
||||
@@ -294,6 +300,15 @@ at the expense of extra computational cost.
|
||||
|
||||
---
|
||||
|
||||
=== Configuration Macros
|
||||
|
||||
==== `BOOST_UNORDERED_ENABLE_STATS`
|
||||
|
||||
Globally define this macro to enable xref:#stats[statistics calculation] for the container. Note
|
||||
that this option decreases the overall performance of many operations.
|
||||
|
||||
---
|
||||
|
||||
=== Typedefs
|
||||
|
||||
[source,c++,subs=+quotes]
|
||||
@@ -424,6 +439,8 @@ unordered_node_set(unordered_node_set&& other);
|
||||
|
||||
The move constructor. The internal bucket array of `other` is transferred directly to the new container.
|
||||
The hash function, predicate and allocator are moved-constructed from `other`.
|
||||
If statistics are xref:unordered_node_set_boost_unordered_enable_stats[enabled],
|
||||
transfers the internal statistical information from `other` and calls `other.reset_stats()`.
|
||||
|
||||
---
|
||||
|
||||
@@ -466,6 +483,9 @@ unordered_node_set(unordered_node_set&& other, Allocator const& a);
|
||||
If `a == other.get_allocator()`, the element nodes of `other` are transferred directly to the new container;
|
||||
otherwise, elements are moved-constructed from those of `other`. The hash function and predicate are moved-constructed
|
||||
from `other`, and the allocator is copy-constructed from `a`.
|
||||
If statistics are xref:unordered_node_set_boost_unordered_enable_stats[enabled],
|
||||
transfers the internal statistical information from `other` iff `a == other.get_allocator()`,
|
||||
and always calls `other.reset_stats()`.
|
||||
|
||||
---
|
||||
|
||||
@@ -620,6 +640,9 @@ The move assignment operator. Destroys previously existing elements, swaps the h
|
||||
and move-assigns the allocator from `other` if `Alloc::propagate_on_container_move_assignment` exists and `Alloc::propagate_on_container_move_assignment::value` is `true`.
|
||||
If at this point the allocator is equal to `other.get_allocator()`, the internal bucket array of `other` is transferred directly to the new container;
|
||||
otherwise, inserts move-constructed copies of the elements of `other`.
|
||||
If statistics are xref:unordered_node_set_boost_unordered_enable_stats[enabled],
|
||||
transfers the internal statistical information from `other` iff the final allocator is equal to `other.get_allocator()`,
|
||||
and always calls `other.reset_stats()`.
|
||||
|
||||
---
|
||||
|
||||
@@ -1228,6 +1251,32 @@ Invalidates iterators and changes the order of elements.
|
||||
[horizontal]
|
||||
Throws:;; The function has no effect if an exception is thrown, unless it is thrown by the container's hash function or comparison function.
|
||||
|
||||
---
|
||||
|
||||
=== Statistics
|
||||
|
||||
==== get_stats
|
||||
```c++
|
||||
stats get_stats() const;
|
||||
```
|
||||
|
||||
[horizontal]
|
||||
Returns:;; A statistical description of the insertion and lookup operations performed by the container so far.
|
||||
Notes:;; Only available if xref:stats[statistics calculation] is xref:unordered_node_set_boost_unordered_enable_stats[enabled].
|
||||
|
||||
---
|
||||
|
||||
==== reset_stats
|
||||
```c++
|
||||
void reset_stats() noexcept;
|
||||
```
|
||||
|
||||
[horizontal]
|
||||
Effects:;; Sets to zero the internal statistics kept by the container.
|
||||
Notes:;; Only available if xref:stats[statistics calculation] is xref:unordered_node_set_boost_unordered_enable_stats[enabled].
|
||||
|
||||
---
|
||||
|
||||
=== Deduction Guides
|
||||
A deduction guide will not participate in overload resolution if any of the following are true:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user