Bitcoin Core 28.99.0
P2P Digital Currency
Namespaces | Functions | Variables
bench.cpp File Reference
#include <bench/bench.h>
#include <test/util/setup_common.h>
#include <tinyformat.h>
#include <util/fs.h>
#include <util/string.h>
#include <chrono>
#include <compare>
#include <fstream>
#include <functional>
#include <iostream>
#include <map>
#include <ratio>
#include <regex>
#include <set>
#include <stdexcept>
#include <string>
#include <vector>
Include dependency graph for bench.cpp:

Go to the source code of this file.

Namespaces

namespace  benchmark
 

Functions

std::string benchmark::ListPriorities ()
 
uint8_t benchmark::StringToPriority (const std::string &str)
 

Variables

const std::function< void(const std::string &)> G_TEST_LOG_FUN {}
 This is connected to the logger. More...
 
static std::function< std::vector< const char * >()> g_bench_command_line_args {}
 Retrieves the available test setup command line arguments that may be used in the benchmark. More...
 
const std::function< std::vector< const char * >()> G_TEST_COMMAND_LINE_ARGUMENTS
 Retrieve the command line arguments. More...
 
static std::string g_running_benchmark_name
 Retrieve the name of the currently in-use benchmark. More...
 
const std::function< std::string()> G_TEST_GET_FULL_NAME
 Retrieve the unit test name. More...
 
std::map< std::string, uint8_t > benchmark::map_label_priority
 

Variable Documentation

◆ g_bench_command_line_args

std::function<std::vector<const char*>()> g_bench_command_line_args {}
static

Retrieves the available test setup command line arguments that may be used in the benchmark.

They will be used only if the benchmark utilizes a 'BasicTestingSetup' or any child of it.

Definition at line 35 of file bench.cpp.

◆ g_running_benchmark_name

std::string g_running_benchmark_name
static

Retrieve the name of the currently in-use benchmark.

This is applicable only to benchmarks that utilize the unit test framework context setup (e.g. ones using 'MakeNoLogFileContext<TestingSetup>()'). It places the datadir of each benchmark run within their respective benchmark name.

Definition at line 46 of file bench.cpp.

◆ G_TEST_COMMAND_LINE_ARGUMENTS

const std::function<std::vector<const char*>()> G_TEST_COMMAND_LINE_ARGUMENTS
Initial value:
= []() {
}
static std::function< std::vector< const char * >()> g_bench_command_line_args
Retrieves the available test setup command line arguments that may be used in the benchmark.
Definition: bench.cpp:35

Retrieve the command line arguments.

Definition at line 36 of file bench.cpp.

◆ G_TEST_GET_FULL_NAME

const std::function<std::string()> G_TEST_GET_FULL_NAME
Initial value:
= []() {
}
static std::string g_running_benchmark_name
Retrieve the name of the currently in-use benchmark.
Definition: bench.cpp:46

Retrieve the unit test name.

Definition at line 47 of file bench.cpp.

◆ G_TEST_LOG_FUN

const std::function<void(const std::string&)> G_TEST_LOG_FUN {}

This is connected to the logger.

Can be used to redirect logs to any other log

Definition at line 28 of file bench.cpp.