Go to the documentation of this file.
15 #ifndef BENCHMARK_PERF_COUNTERS_H
16 #define BENCHMARK_PERF_COUNTERS_H
22 #include "benchmark/benchmark.h"
26 #ifndef BENCHMARK_OS_WINDOWS
57 return {
reinterpret_cast<char*
>(
values_.data()),
62 std::array<uint64_t, kPadding + kMaxCounters>
values_;
96 #ifndef BENCHMARK_OS_WINDOWS
113 std::vector<int>&& counter_ids)
152 std::vector<std::pair<std::string, double>>
ret;
154 double measurement =
static_cast<double>(
end_values_[
i]) -
172 #endif // BENCHMARK_PERF_COUNTERS_H
static BENCHMARK_UNUSED bool perf_init_anchor
#define BM_CHECK_LE(a, b)
std::vector< int > counter_ids_
const std::vector< std::string > & names() const
PerfCounters(const std::vector< std::string > &counter_names, std::vector< int > &&counter_ids)
const size_t nr_counters_
static const bool kSupported
constexpr absl::remove_reference_t< T > && move(T &&t) noexcept
static PerfCounters Create(const std::vector< std::string > &counter_names)
static constexpr size_t kPadding
unsigned __int64 uint64_t
static int read_bytes(int fd, char *buf, size_t read_size, int spin)
const std::vector< std::string > counter_names_
static constexpr size_t kMaxCounters
#define BENCHMARK_ALWAYS_INLINE
std::pair< char *, size_t > get_data_buffer()
BENCHMARK_ALWAYS_INLINE void Start()
size_t num_counters() const
static PerfCounters NoCounters()
int read(izstream &zs, T *x, Items items)
PerfCounterValues start_values_
BENCHMARK_ALWAYS_INLINE bool Snapshot(PerfCounterValues *values) const
UniquePtr< SSL_SESSION > ret
std::array< int64_t, Size > values
BENCHMARK_ALWAYS_INLINE std::vector< std::pair< std::string, double > > StopAndGetMeasurements()
uint64_t operator[](size_t pos) const
PerfCountersMeasurement(PerfCounters &&c)
PerfCounterValues(size_t nr_counters)
PerfCounterValues end_values_
std::array< uint64_t, kPadding+kMaxCounters > values_
grpc
Author(s):
autogenerated on Thu Mar 13 2025 03:00:51