#ifndef V8_HEAP_BASE_BYTES_H_
#define V8_HEAP_BASE_BYTES_H_
#include <algorithm>
#include <cstddef>
#include <limits>
#include <optional>
#include "src/base/platform/time.h"
#include "src/base/ring-buffer.h"
namespace heap::base {
struct BytesAndDuration final { … };
using BytesAndDurationBuffer = v8::base::RingBuffer<BytesAndDuration>;
inline double AverageSpeed(
const BytesAndDurationBuffer& buffer, const BytesAndDuration& initial,
std::optional<v8::base::TimeDelta> selected_duration,
size_t min_non_empty_speed = 0,
size_t max_speed = std::numeric_limits<size_t>::max()) { … }
}
#endif