7#include <test/util/setup_common.h>
18 const std::vector<const char *> &extra_args,
19 const std::function<
void()> &log) {
23 TestingSetup test_setup{
28 bench.
run([&] { log(); });
32 Logging(bench, {
"-logthreadnames=0",
"-debug=net"},
37 Logging(bench, {
"-logthreadnames=0",
"-debug=0"},
42 Logging(bench, {
"-logthreadnames=1"}, [] {
LogInfo(
"%s\n",
"test"); });
46 Logging(bench, {
"-logthreadnames=0"}, [] {
LogInfo(
"%s\n",
"test"); });
52 Logging(bench, {
"-nodebuglogfile",
"-debug=1"}, [] {
static void LogWithThreadNames(benchmark::Bench &bench)
static void LogWithoutWriteToFile(benchmark::Bench &bench)
static void LogWithoutDebug(benchmark::Bench &bench)
static void LogWithDebug(benchmark::Bench &bench)
static void Logging(benchmark::Bench &bench, const std::vector< const char * > &extra_args, const std::function< void()> &log)
static void LogWithoutThreadNames(benchmark::Bench &bench)
void DisableCategory(LogFlags category)
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 LogDebug(category,...)