#pragma once #include "types/duration_types.hpp" #include "types/operation_type.hpp" #include #include #include #include namespace metrics { using ReadingItem = std::pair; class CollectionFunction { public: virtual ~CollectionFunction() = default; virtual double calculate(const std::vector& readings, Milliseconds timestamp) const = 0; virtual double calculateForStartupInterval(std::vector& readings, Milliseconds timestamp) const = 0; }; std::shared_ptr makeCollectionFunction(OperationType); } // namespace metrics