We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1d294ee commit 439a9d1Copy full SHA for 439a9d1
2 files changed
include/bitcoin/database/impl/query/query.ipp
@@ -74,6 +74,14 @@ CLASS::query(Store& store) NOEXCEPT
74
{
75
}
76
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
+
85
TEMPLATE
86
code CLASS::get_code() const NOEXCEPT
87
include/bitcoin/database/query.hpp
@@ -85,6 +85,9 @@ class query
/// Get first fault code.
code get_fault() const NOEXCEPT;
88
+ // TESTING
89
+ uint64_t get_point_rate() const NOEXCEPT;
90
91
/// True if there is a fault condition (disk full is not a fault).
92
bool is_fault() const NOEXCEPT;
93
0 commit comments