forked from boostorg/unordered
documented stats
This commit is contained in:
1 parent
4c0aea983e
commit
86f622240d
9 files changed
+371
No files matched your search
@@ -45,6 +45,8 @@ namespace boost {
|
||||
using size_type = std::size_t;
|
||||
using difference_type = std::ptrdiff_t;
|
||||
|
||||
using stats = xref:stats_stats_type[__stats-type__]; // if statistics are xref:concurrent_flat_set_boost_unordered_enable_stats[enabled]
|
||||
|
||||
// constants
|
||||
static constexpr size_type xref:#concurrent_flat_set_constants[bulk_visit_size] = _implementation-defined_;
|
||||
|
||||
@@ -188,6 +190,10 @@ namespace boost {
|
||||
size_type xref:#concurrent_flat_set_max_load[max_load]() const noexcept;
|
||||
void xref:#concurrent_flat_set_rehash[rehash](size_type n);
|
||||
void xref:#concurrent_flat_set_reserve[reserve](size_type n);
|
||||
|
||||
// statistics (if xref:concurrent_flat_set_boost_unordered_enable_stats[enabled])
|
||||
stats xref:#concurrent_flat_set_get_stats[get_stats]() const;
|
||||
void xref:#concurrent_flat_set_reset_stats[reset_stats]() noexcept;
|
||||
};
|
||||
|
||||
// Deduction Guides
|
||||
@@ -358,6 +364,15 @@ a function visiting elements of `m`) are detected and signalled through `BOOST_A
|
||||
When run-time speed is a concern, the feature can be disabled by globally defining
|
||||
this macro.
|
||||
|
||||
---
|
||||
|
||||
==== `BOOST_UNORDERED_ENABLE_STATS`
|
||||
|
||||
Globally define this macro to enable xref:#stats[statistics calculation] for the table. Note
|
||||
that this option decreases the overall performance of many operations.
|
||||
|
||||
---
|
||||
|
||||
=== Constants
|
||||
|
||||
```cpp
|
||||
@@ -439,6 +454,8 @@ concurrent_flat_set(concurrent_flat_set&& other);
|
||||
|
||||
The move constructor. The internal bucket array of `other` is transferred directly to the new table.
|
||||
The hash function, predicate and allocator are moved-constructed from `other`.
|
||||
If statistics are xref:concurrent_flat_set_boost_unordered_enable_stats[enabled],
|
||||
transfers the internal statistical information from `other` and calls `other.reset_stats()`.
|
||||
|
||||
[horizontal]
|
||||
Concurrency:;; Blocking on `other`.
|
||||
@@ -487,6 +504,9 @@ concurrent_flat_set(concurrent_flat_set&& other, Allocator const& a);
|
||||
If `a == other.get_allocator()`, the elements of `other` are transferred directly to the new table;
|
||||
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:concurrent_flat_set_boost_unordered_enable_stats[enabled],
|
||||
transfers the internal statistical information from `other` iff `a == other.get_allocator()`,
|
||||
and always calls `other.reset_stats()`.
|
||||
|
||||
[horizontal]
|
||||
Concurrency:;; Blocking on `other`.
|
||||
@@ -502,6 +522,8 @@ concurrent_flat_set(unordered_flat_set<Key, Hash, Pred, Allocator>&& other);
|
||||
Move construction from a xref:#unordered_flat_set[`unordered_flat_set`].
|
||||
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:concurrent_flat_set_boost_unordered_enable_stats[enabled],
|
||||
transfers the internal statistical information from `other` and calls `other.reset_stats()`.
|
||||
|
||||
[horizontal]
|
||||
Complexity:;; O(`bucket_count()`)
|
||||
@@ -659,6 +681,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 `*this`;
|
||||
otherwise, inserts move-constructed copies of the elements of `other`.
|
||||
If statistics are xref:concurrent_flat_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()`.
|
||||
|
||||
[horizontal]
|
||||
Concurrency:;; Blocking on `*this` and `other`.
|
||||
@@ -1316,6 +1341,30 @@ Concurrency:;; Blocking on `*this`.
|
||||
|
||||
---
|
||||
|
||||
=== Statistics
|
||||
|
||||
==== get_stats
|
||||
```c++
|
||||
stats get_stats() const;
|
||||
```
|
||||
|
||||
[horizontal]
|
||||
Returns:;; A statistical description of the insertion and lookup operations performed by the table so far.
|
||||
Notes:;; Only available if xref:stats[statistics calculation] is xref:concurrent_flat_set_boost_unordered_enable_stats[enabled].
|
||||
|
||||
---
|
||||
|
||||
==== reset_stats
|
||||
```c++
|
||||
void reset_stats() noexcept;
|
||||
```
|
||||
|
||||
[horizontal]
|
||||
Effects:;; Sets to zero the internal statistics kept by the table.
|
||||
Notes:;; Only available if xref:stats[statistics calculation] is xref:concurrent_flat_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