prepare benchs

pull/3340/head
Arnaud Kleinpeter 6 months ago
parent 22405cf9ae
commit f6aa0c0fcf

@ -57,7 +57,7 @@ void bench_threaded_logging(size_t threads, int iters) {
void bench_single_threaded(int iters) {
spdlog::info("**************************************************************");
spdlog::info(spdlog::fmt_lib::format(std::locale("en_US.UTF-8"), "Single threaded: {} messages", iters));
spdlog::info(spdlog::fmt_lib::format(std::locale("en_US.UTF-8"), "Single threaded: {:L} messages", iters));
spdlog::info("**************************************************************");
auto basic_st = spdlog::create<basic_file_sink_st>("basic_st", "logs/basic_st.log", true);
@ -94,7 +94,6 @@ int main(int argc, char *argv[]) {
}
bench_single_threaded(iters);
bench_threaded_logging(1, iters);
bench_threaded_logging(threads, iters);
} catch (std::exception &ex) {
spdlog::error(ex.what());

@ -58,7 +58,7 @@ function(spdlog_enable_addr_sanitizer target_name)
target_compile_options(${target_name} PRIVATE -fno-sanitize=signed-integer-overflow)
target_compile_options(${target_name} PRIVATE -fno-sanitize-recover=all)
target_compile_options(${target_name} PRIVATE -fno-omit-frame-pointer)
target_link_libraries(${target_name} PRIVATE -fsanitize=address,undefined -fuse-ld=gold)
target_link_libraries(${target_name} PRIVATE -fsanitize=address,undefined)
endfunction()
# Enable thread sanitizer (gcc/clang only)
@ -69,5 +69,5 @@ function(spdlog_enable_thread_sanitizer target_name)
message(STATUS "Thread sanitizer enabled")
target_compile_options(${target_name} PRIVATE -fsanitize=thread)
target_compile_options(${target_name} PRIVATE -fno-omit-frame-pointer)
target_link_libraries(${target_name} PRIVATE -fsanitize=thread -fuse-ld=gold)
target_link_libraries(${target_name} PRIVATE -fsanitize=thread)
endfunction()

Loading…
Cancel
Save