Public Member Functions | Public Attributes | Private Member Functions | Private Attributes | List of all members
benchmark::State Class Reference

#include <benchmark.h>

Public Member Functions

BENCHMARK_ALWAYS_INLINE size_t bytes_processed () const
 
BENCHMARK_ALWAYS_INLINE int complexity_length_n ()
 
BENCHMARK_ALWAYS_INLINE size_t items_processed () const
 
BENCHMARK_ALWAYS_INLINE size_t iterations () const
 
bool KeepRunning ()
 
void PauseTiming ()
 
BENCHMARK_ALWAYS_INLINE int range (std::size_t pos=0) const
 
int range_x () const
 
int range_y () const
 
void ResumeTiming ()
 
BENCHMARK_ALWAYS_INLINE void SetBytesProcessed (size_t bytes)
 
BENCHMARK_ALWAYS_INLINE void SetComplexityN (int complexity_n)
 
BENCHMARK_ALWAYS_INLINE void SetItemsProcessed (size_t items)
 
void SetIterationTime (double seconds)
 
void SetLabel (const char *label)
 
void BENCHMARK_ALWAYS_INLINE SetLabel (const std::string &str)
 
void SkipWithError (const char *msg)
 
 State (size_t max_iters, const std::vector< int > &ranges, int thread_i, int n_threads, internal::ThreadTimer *timer, internal::ThreadManager *manager)
 

Public Attributes

UserCounters counters
 
const size_t max_iterations
 
const int thread_index
 
const int threads
 

Private Member Functions

 BENCHMARK_DISALLOW_COPY_AND_ASSIGN (State)
 
void FinishKeepRunning ()
 
void StartKeepRunning ()
 

Private Attributes

size_t bytes_processed_
 
int complexity_n_
 
bool error_occurred_
 
bool finished_
 
size_t items_processed_
 
internal::ThreadManagermanager_
 
std::vector< int > range_
 
bool started_
 
internal::ThreadTimertimer_
 
size_t total_iterations_
 

Detailed Description

Definition at line 399 of file benchmark.h.

Constructor & Destructor Documentation

◆ State()

State::State ( size_t  max_iters,
const std::vector< int > &  ranges,
int  thread_i,
int  n_threads,
internal::ThreadTimer timer,
internal::ThreadManager manager 
)

Definition at line 399 of file benchmark.cc.

Member Function Documentation

◆ BENCHMARK_DISALLOW_COPY_AND_ASSIGN()

benchmark::State::BENCHMARK_DISALLOW_COPY_AND_ASSIGN ( State  )
private

◆ bytes_processed()

BENCHMARK_ALWAYS_INLINE size_t benchmark::State::bytes_processed ( ) const
inline

Definition at line 478 of file benchmark.h.

◆ complexity_length_n()

BENCHMARK_ALWAYS_INLINE int benchmark::State::complexity_length_n ( )
inline

Definition at line 489 of file benchmark.h.

◆ FinishKeepRunning()

void State::FinishKeepRunning ( )
private

Definition at line 461 of file benchmark.cc.

◆ items_processed()

BENCHMARK_ALWAYS_INLINE size_t benchmark::State::items_processed ( ) const
inline

Definition at line 501 of file benchmark.h.

◆ iterations()

BENCHMARK_ALWAYS_INLINE size_t benchmark::State::iterations ( ) const
inline

Definition at line 535 of file benchmark.h.

◆ KeepRunning()

bool benchmark::State::KeepRunning ( )
inline

Definition at line 404 of file benchmark.h.

◆ PauseTiming()

void State::PauseTiming ( )

Definition at line 420 of file benchmark.cc.

◆ range()

BENCHMARK_ALWAYS_INLINE int benchmark::State::range ( std::size_t  pos = 0) const
inline

Definition at line 523 of file benchmark.h.

◆ range_x()

int benchmark::State::range_x ( ) const
inline

Definition at line 529 of file benchmark.h.

◆ range_y()

int benchmark::State::range_y ( ) const
inline

Definition at line 532 of file benchmark.h.

◆ ResumeTiming()

void State::ResumeTiming ( )

Definition at line 426 of file benchmark.cc.

◆ SetBytesProcessed()

BENCHMARK_ALWAYS_INLINE void benchmark::State::SetBytesProcessed ( size_t  bytes)
inline

Definition at line 475 of file benchmark.h.

◆ SetComplexityN()

BENCHMARK_ALWAYS_INLINE void benchmark::State::SetComplexityN ( int  complexity_n)
inline

Definition at line 486 of file benchmark.h.

◆ SetItemsProcessed()

BENCHMARK_ALWAYS_INLINE void benchmark::State::SetItemsProcessed ( size_t  items)
inline

Definition at line 498 of file benchmark.h.

◆ SetIterationTime()

void State::SetIterationTime ( double  seconds)

Definition at line 445 of file benchmark.cc.

◆ SetLabel() [1/2]

void State::SetLabel ( const char *  label)

Definition at line 449 of file benchmark.cc.

◆ SetLabel() [2/2]

void BENCHMARK_ALWAYS_INLINE benchmark::State::SetLabel ( const std::string str)
inline

Definition at line 517 of file benchmark.h.

◆ SkipWithError()

void State::SkipWithError ( const char *  msg)

Definition at line 431 of file benchmark.cc.

◆ StartKeepRunning()

void State::StartKeepRunning ( )
private

Definition at line 454 of file benchmark.cc.

Member Data Documentation

◆ bytes_processed_

size_t benchmark::State::bytes_processed_
private

Definition at line 544 of file benchmark.h.

◆ complexity_n_

int benchmark::State::complexity_n_
private

Definition at line 547 of file benchmark.h.

◆ counters

UserCounters benchmark::State::counters

Definition at line 553 of file benchmark.h.

◆ error_occurred_

bool benchmark::State::error_occurred_
private

Definition at line 549 of file benchmark.h.

◆ finished_

bool benchmark::State::finished_
private

Definition at line 539 of file benchmark.h.

◆ items_processed_

size_t benchmark::State::items_processed_
private

Definition at line 545 of file benchmark.h.

◆ manager_

internal::ThreadManager* benchmark::State::manager_
private

Definition at line 569 of file benchmark.h.

◆ max_iterations

const size_t benchmark::State::max_iterations

Definition at line 558 of file benchmark.h.

◆ range_

std::vector<int> benchmark::State::range_
private

Definition at line 542 of file benchmark.h.

◆ started_

bool benchmark::State::started_
private

Definition at line 538 of file benchmark.h.

◆ thread_index

const int benchmark::State::thread_index

Definition at line 555 of file benchmark.h.

◆ threads

const int benchmark::State::threads

Definition at line 557 of file benchmark.h.

◆ timer_

internal::ThreadTimer* benchmark::State::timer_
private

Definition at line 568 of file benchmark.h.

◆ total_iterations_

size_t benchmark::State::total_iterations_
private

Definition at line 540 of file benchmark.h.


The documentation for this class was generated from the following files:


libaditof
Author(s):
autogenerated on Wed May 21 2025 02:07:06