valFuzz 1.2.0
Loading...
Searching...
No Matches
benchmark.hpp File Reference
#include <atomic>
#include <cmath>
#include <cstdlib>
#include <ctime>
#include <deque>
#include <filesystem>
#include <fstream>
#include <functional>
#include <iostream>
#include <limits>
#include <mutex>
#include <optional>
#include <string>
#include <tuple>
#include <valfuzz/common.hpp>
#include <valfuzz/reporter.hpp>

Go to the source code of this file.

Namespaces

namespace  valfuzz
 

Macros

#define NUM_ITERATIONS_BENCHMARK   10000
 
#define BENCHMARK(name, pretty_name)
 
#define RUN_BENCHMARK(input_size, ...)
 

Typedefs

typedef std::function< void(std::string)> valfuzz::benchmark_function
 
typedef std::pair< std::string, benchmark_functionvalfuzz::benchmark_pair
 

Functions

unsigned long valfuzz::get_cache_l3_size ()
 
bool & valfuzz::get_do_benchmarks ()
 
int & valfuzz::get_num_iterations_benchmark ()
 
bool & valfuzz::get_run_one_benchmark ()
 
std::string & valfuzz::get_one_benchmark ()
 
unsigned long valfuzz::get_num_benchmarks ()
 
std::deque< benchmark_pair > & valfuzz::get_benchmarks ()
 
std::atomic< bool > & valfuzz::get_save_to_file ()
 
std::ofstream & valfuzz::get_save_file ()
 
void valfuzz::set_save_to_file (bool save_to_file)
 
void valfuzz::set_save_file (const std::filesystem::path &save_to_file_path)
 
void valfuzz::add_benchmark (const std::string &name, benchmark_function benchmark)
 
void valfuzz::set_do_benchmarks (bool do_benchmarks)
 
void valfuzz::set_num_iterations_benchmark (int num_iterations_benchmark)
 
void valfuzz::set_run_one_benchmark (bool run_one_benchmark)
 
void valfuzz::set_one_benchmark (const std::string &one_benchmark)
 
void valfuzz::run_benchmarks ()
 

Macro Definition Documentation

◆ BENCHMARK

#define BENCHMARK ( name,
pretty_name )
Value:
void name([[maybe_unused]] const std::string &benchmark_name); \
static struct name##_register \
{ \
name##_register() \
{ \
valfuzz::add_benchmark(pretty_name, name); \
} \
} name##_register_instance; \
void name([[maybe_unused]] const std::string &benchmark_name)

Definition at line 36 of file benchmark.hpp.

◆ NUM_ITERATIONS_BENCHMARK

#define NUM_ITERATIONS_BENCHMARK   10000

Definition at line 32 of file benchmark.hpp.

◆ RUN_BENCHMARK

#define RUN_BENCHMARK ( input_size,
... )

Definition at line 47 of file benchmark.hpp.