Bitcoin Core 30.99.0
P2P Digital Currency
Namespaces | Variables
bench.cpp File Reference
#include <bench/bench.h>
#include <test/util/setup_common.h>
#include <util/check.h>
#include <util/fs.h>
#include <chrono>
#include <compare>
#include <fstream>
#include <functional>
#include <iostream>
#include <regex>
#include <string>
#include <utility>
#include <vector>
Include dependency graph for bench.cpp:

Go to the source code of this file.

Namespaces

namespace  benchmark
 

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...
 

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 30 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 41 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:30

Retrieve the command line arguments.

Definition at line 31 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:41

Retrieve the unit test name.

Definition at line 42 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 23 of file bench.cpp.