16 static void Logging(
benchmark::Bench& bench,
const std::vector<const char*>& extra_args,
const std::function<
void()>& log)
26 bench.
run([&] { log(); });
31 Logging(bench, {
"-logthreadnames=1",
"-debug=net"}, [] {
37 Logging(bench, {
"-logthreadnames=0",
"-debug=net"}, [] {
53 Logging(bench, {
"-logthreadnames=1",
"-debug=net"}, [] {
60 Logging(bench, {
"-logthreadnames=0",
"-debug=net"}, [] {
78 Logging(bench, {
"-nodebuglogfile",
"-debug=1"}, [] {
static void LogPrintfWithThreadNames(benchmark::Bench &bench)
static void LogWithoutWriteToFile(benchmark::Bench &bench)
static void LogPrintfCategoryWithoutThreadNames(benchmark::Bench &bench)
static void LogPrintfWithoutThreadNames(benchmark::Bench &bench)
static void LogPrintWithCategory(benchmark::Bench &bench)
static void LogPrintLevelWithoutThreadNames(benchmark::Bench &bench)
static void LogPrintfCategoryWithThreadNames(benchmark::Bench &bench)
static void LogPrintLevelWithThreadNames(benchmark::Bench &bench)
static void Logging(benchmark::Bench &bench, const std::vector< const char * > &extra_args, const std::function< void()> &log)
static void LogPrintWithoutCategory(benchmark::Bench &bench)
BENCHMARK(LogPrintLevelWithThreadNames, benchmark::PriorityLevel::HIGH)
void DisableCategory(LogFlags flag)
Main entry point to nanobench's benchmarking facility.
Bench & run(char const *benchmarkName, Op &&op)
Repeatedly calls op() based on the configuration, and performs measurements.
BCLog::Logger & LogInstance()
#define LogPrintLevel(category, level,...)
#define LogPrint(category,...)
#define LogPrintfCategory(category,...)
Testing setup that configures a complete environment.