8#include <userver/utils/statistics/recentperiod.hpp>
10USERVER_NAMESPACE_BEGIN
12namespace utils::statistics {
19class BusyStorage
final {
21 using Duration = std::chrono::steady_clock::duration;
23 BusyStorage(Duration epoch_duration, Duration history_period);
41 Duration GetNotCommittedLoad()
const noexcept;
44 std::unique_ptr<Impl> pimpl;
52class BusyMarker
final {
54 BusyMarker(BusyStorage& storage) : storage_(storage) { storage_
.StartWork(); }
56 BusyMarker(
const BusyMarker&) =
delete;
57 BusyMarker& operator=(
const BusyMarker&) =
delete;
62 BusyStorage& storage_;