spdlog
Loading...
Searching...
No Matches
Functions | Variables
bench.cpp File Reference

Go to the source code of this file.

#include "spdlog/spdlog.h"
#include "spdlog/sinks/basic_file_sink.h"
#include "spdlog/sinks/daily_file_sink.h"
#include "spdlog/sinks/null_sink.h"
#include "spdlog/sinks/rotating_file_sink.h"
#include "spdlog/fmt/bundled/format.h"
#include "utils.h"
#include <atomic>
#include <cstdlib>
#include <memory>
#include <string>
#include <thread>

Functions

void bench (int howmany, std::shared_ptr< spdlog::logger > log)
 
void bench_mt (int howmany, std::shared_ptr< spdlog::logger > log, size_t thread_count)
 
void bench_threaded_logging (size_t threads, int iters)
 
void bench_single_threaded (int iters)
 
int main (int argc, char *argv[])
 

Variables

static const size_t file_size = 30 * 1024 * 1024
 
static const size_t rotating_files = 5
 
static const int max_threads = 1000
 

Function Documentation

◆ bench()

void bench ( int  howmany,
std::shared_ptr< spdlog::logger log 
)

Definition at line 146 of file bench.cpp.

◆ bench_mt()

void bench_mt ( int  howmany,
std::shared_ptr< spdlog::logger log,
size_t  thread_count 
)

Definition at line 166 of file bench.cpp.

◆ bench_single_threaded()

void bench_single_threaded ( int  iters)

Definition at line 74 of file bench.cpp.

◆ bench_threaded_logging()

void bench_threaded_logging ( size_t  threads,
int  iters 
)

Definition at line 38 of file bench.cpp.

◆ main()

int main ( int  argc,
char argv[] 
)

Definition at line 111 of file bench.cpp.

Variable Documentation

◆ file_size

const size_t file_size = 30 * 1024 * 1024
static

Definition at line 34 of file bench.cpp.

◆ max_threads

const int max_threads = 1000
static

Definition at line 36 of file bench.cpp.

◆ rotating_files

const size_t rotating_files = 5
static

Definition at line 35 of file bench.cpp.