File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -74,14 +74,6 @@ CLASS::query(Store& store) NOEXCEPT
7474{
7575}
7676
77- TEMPLATE
78- uint64_t CLASS::get_point_rate () const NOEXCEPT
79- {
80- const auto negative = (double )store_.point .negative_search_count ();
81- const auto positive = (double )store_.point .positive_search_count ();
82- return static_cast <uint64_t >(10'000.0 * (positive / (positive + negative)));
83- }
84-
8577TEMPLATE
8678code CLASS::get_code () const NOEXCEPT
8779{
Original file line number Diff line number Diff line change @@ -49,6 +49,18 @@ class hashmap
4949
5050 hashmap (storage& header, storage& body, const Link& buckets) NOEXCEPT;
5151
52+ // / Count of puts resulting in table body search to detect duplication.
53+ size_t positive_search_count () const NOEXCEPT
54+ {
55+ return pcounter_.load (std::memory_order_relaxed);
56+ }
57+
58+ // / Count of puts not resulting in table body search to detect duplication.
59+ size_t negative_search_count () const NOEXCEPT
60+ {
61+ return ncounter_.load (std::memory_order_relaxed);
62+ }
63+
5264 // / Setup, not thread safe.
5365 // / -----------------------------------------------------------------------
5466
@@ -79,16 +91,6 @@ class hashmap
7991 // / Increase count as neccesary to specified.
8092 bool expand (const Link& count) NOEXCEPT;
8193
82- // / Count of puts resulting in table body search to detect duplication.
83- size_t negative_search_count () const NOEXCEPT
84- {
85- return ncounter_.load (std::memory_order_relaxed);
86- }
87- size_t positive_search_count () const NOEXCEPT
88- {
89- return pcounter_.load (std::memory_order_relaxed);
90- }
91-
9294 // / Errors.
9395 // / -----------------------------------------------------------------------
9496
Original file line number Diff line number Diff line change @@ -76,6 +76,18 @@ class query
7676
7777 query (Store& store) NOEXCEPT;
7878
79+ // / Count of puts resulting in table body search to detect duplication.
80+ size_t positive_search_count () const NOEXCEPT
81+ {
82+ return store_.point .positive_search_count ();
83+ }
84+
85+ // / Count of puts not resulting in table body search to detect duplication.
86+ size_t negative_search_count () const NOEXCEPT
87+ {
88+ return store_.point .negative_search_count ();
89+ }
90+
7991 // / Store management from query-holder (not store owner) context.
8092 // / -----------------------------------------------------------------------
8193
@@ -85,9 +97,6 @@ class query
8597 // / Get first fault code.
8698 code get_fault () const NOEXCEPT;
8799
88- // TESTING
89- uint64_t get_point_rate () const NOEXCEPT;
90-
91100 // / True if there is a fault condition (disk full is not a fault).
92101 bool is_fault () const NOEXCEPT;
93102
You can’t perform that action at this time.
0 commit comments