10namespace utils::statistics {
16 using ValueType = std::uint64_t;
20 inline Rate& operator+=(
Rate other)
noexcept {
25 explicit operator
bool()
const noexcept {
return value != 0; }
27 bool operator==(
Rate rhs)
const noexcept {
return value == rhs.value; }
29 bool operator!=(
Rate rhs)
const noexcept {
return !(*
this == rhs); }
31 bool operator<(
Rate rhs)
const noexcept {
return value < rhs.value; }
33 bool operator>(
Rate rhs)
const noexcept {
return rhs < *
this; }
35 bool operator<=(
Rate rhs)
const noexcept {
return !(rhs < *
this); }
37 bool operator>=(
Rate rhs)
const noexcept {
return !(*
this < rhs); }
39 bool operator==(std::uint64_t rhs)
const noexcept {
return value == rhs; }
41 bool operator!=(std::uint64_t rhs)
const noexcept {
return value == rhs; }
43 bool operator<(std::uint64_t rhs)
const noexcept {
return value < rhs; }
45 bool operator>(std::uint64_t rhs)
const noexcept {
return value > rhs; }
47 bool operator<=(std::uint64_t rhs)
const noexcept {
return value <= rhs; }
49 bool operator>=(std::uint64_t rhs)
const noexcept {
return value >= rhs; }
53 return Rate{first.value + second.value};