Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactored test #23

Merged
merged 1 commit into from
Jan 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
71 changes: 70 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,72 @@
{
"cmake.configureOnOpen": false
"cmake.configureOnOpen": false,
"files.associations": {
"__bit_reference": "cpp",
"__config": "cpp",
"__debug": "cpp",
"__errc": "cpp",
"__hash_table": "cpp",
"__locale": "cpp",
"__mutex_base": "cpp",
"__node_handle": "cpp",
"__split_buffer": "cpp",
"__threading_support": "cpp",
"__tree": "cpp",
"__verbose_abort": "cpp",
"any": "cpp",
"array": "cpp",
"atomic": "cpp",
"bitset": "cpp",
"cctype": "cpp",
"charconv": "cpp",
"clocale": "cpp",
"cmath": "cpp",
"complex": "cpp",
"condition_variable": "cpp",
"cstdarg": "cpp",
"cstddef": "cpp",
"cstdint": "cpp",
"cstdio": "cpp",
"cstdlib": "cpp",
"cstring": "cpp",
"ctime": "cpp",
"cwchar": "cpp",
"cwctype": "cpp",
"deque": "cpp",
"exception": "cpp",
"forward_list": "cpp",
"fstream": "cpp",
"future": "cpp",
"initializer_list": "cpp",
"iomanip": "cpp",
"ios": "cpp",
"iosfwd": "cpp",
"iostream": "cpp",
"istream": "cpp",
"limits": "cpp",
"list": "cpp",
"locale": "cpp",
"map": "cpp",
"mutex": "cpp",
"new": "cpp",
"optional": "cpp",
"ostream": "cpp",
"queue": "cpp",
"ratio": "cpp",
"set": "cpp",
"sstream": "cpp",
"stdexcept": "cpp",
"streambuf": "cpp",
"string": "cpp",
"string_view": "cpp",
"system_error": "cpp",
"thread": "cpp",
"tuple": "cpp",
"typeinfo": "cpp",
"unordered_map": "cpp",
"unordered_set": "cpp",
"variant": "cpp",
"vector": "cpp",
"algorithm": "cpp"
}
}
2 changes: 1 addition & 1 deletion benchmark/benchmark_functions.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@

#pragma once
#include <atomic>
#include <cassert>
#include <chrono>
#include <future>
#include <iostream>
#include <cassert>
#include <string>
#include <vector>
#include "q/q_api.hpp"
Expand Down
14 changes: 7 additions & 7 deletions benchmark/benchmark_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,15 @@ namespace {

void print_result(const benchmark_result& result) {
double average_call_time_ns = result.mean_msgs_per_second ? 1e9 / result.mean_msgs_per_second : 0;

std::cout << std::left << std::setw(6) << result.runs << ", "
std::cout << std::left
<< std::setw(6) << result.runs << ", "
<< std::setw(6) << result.num_producer_threads << ", "
<< std::setw(6) << result.num_consumer_threads << ", "
<< std::setw(12) << result.mean_msgs_per_second << ", "
<< std::setw(12) << result.min_msgs_per_second << ", "
<< std::setw(12) << result.max_msgs_per_second << ", "
<< std::setw(10) << average_call_time_ns << ","
<< std::setw(30) << result.comment << std::endl;
<< std::setw(15) << std::fixed << std::setprecision(2) << result.mean_msgs_per_second << ", "
<< std::setw(15) << result.min_msgs_per_second << ", "
<< std::setw(15) << result.max_msgs_per_second << ", "
<< std::setw(15) << std::fixed << std::setprecision(2) << average_call_time_ns << ", "
<< result.comment << std::endl;
}

template <typename QueueType>
Expand Down
Loading