14#include <shared_mutex>
15#include "../utils/thread_utils.hpp"
35 std::array<int, 8> preCT {20, 15, 20, 30, 10, 5, 5, 20};
37 std::array<int, 8> postCT {50, 30, 20, 25, 10, 15, 15, 45};
39 for (
auto _ : state) {
45 std::array<int, 8> preCT {20, 15, 20, 30, 10, 5, 5, 20};
47 std::array<int, 8> postCT {50, 30, 20, 25, 10, 15, 15, 45};
49 for (
auto _ : state) {
55 std::array<int, 8> preCT {2000, 1500, 2000, 3000, 1000, 500, 500, 2000};
57 std::array<int, 8> postCT {5000, 3000, 2000, 2500, 1000, 1500, 1500, 4500};
59 for (
auto _ : state) {
65 std::array<int, 8> preCT {2000, 1500, 2000, 3000, 1000, 500, 500, 2000};
67 std::array<int, 8> postCT {5000, 3000, 2000, 2500, 1000, 1500, 1500, 4500};
69 for (
auto _ : state) {
75 std::array<int, 8> prios {0, 1, 2, 1, 3, 2, 2, 0};
76 std::array<int, 8> preCT {200, 150, 200, 300, 100, 50, 50, 200};
78 std::array<int, 8> postCT {500, 300, 200, 250, 100, 150, 150, 450};
80 for (
auto _ : state) {
86 std::array<int, 8> prios {0, 1, 2, 1, 3, 2, 2, 0};
87 std::array<int, 8> preCT {200, 150, 200, 300, 100, 50, 50, 200};
89 std::array<int, 8> postCT {500, 300, 200, 250, 100, 150, 150, 450};
91 for (
auto _ : state) {
97 std::array<int, 8> prios {0, 1, 2, 1, 3, 2, 2, 0};
98 std::array<int, 8> preCT {2000, 1500, 2000, 3000, 1000, 500, 500, 2000};
100 std::array<int, 8> postCT {5000, 3000, 2000, 2500, 1000, 1500, 1500, 4500};
102 for (
auto _ : state) {
108 std::array<int, 8> prios {0, 1, 2, 1, 3, 2, 2, 0};
109 std::array<int, 8> preCT {2000, 1500, 2000, 3000, 1000, 500, 500, 2000};
111 std::array<int, 8> postCT {5000, 3000, 2000, 2500, 1000, 1500, 1500, 4500};
113 for (
auto _ : state) {
Definition standard_shared_mutex_benchmark.hpp:17
void shared_pipeline_benchmark_long(benchmark::State &state)
Definition standard_shared_mutex_benchmark.hpp:44
void shared_pipeline_benchmark_fast(benchmark::State &state)
Definition standard_shared_mutex_benchmark.hpp:107
void shared_lock_unlock_benchmark(benchmark::State &state)
Definition standard_shared_mutex_benchmark.hpp:27
std::shared_mutex m
Definition standard_shared_mutex_benchmark.hpp:18
void pipeline_benchmark_audio(benchmark::State &state)
Definition standard_shared_mutex_benchmark.hpp:74
void shared_pipeline_benchmark_audio(benchmark::State &state)
Definition standard_shared_mutex_benchmark.hpp:85
void shared_pipeline_benchmark_gaming(benchmark::State &state)
Definition standard_shared_mutex_benchmark.hpp:64
void pipeline_benchmark_fast(benchmark::State &state)
Definition standard_shared_mutex_benchmark.hpp:96
void lock_unlock_benchmark(benchmark::State &state)
Definition standard_shared_mutex_benchmark.hpp:20
void pipeline_benchmark_long(benchmark::State &state)
Definition standard_shared_mutex_benchmark.hpp:34
void pipeline_benchmark_gaming(benchmark::State &state)
Definition standard_shared_mutex_benchmark.hpp:54
void thread_function(Lockable &lockable, int preCriticalTime, int criticalTime, int postCriticalTime, int p=0)
Definition thread_utils.hpp:26