15#include "../utils/thread_utils.hpp"
35 std::array<int, 8> prios {0, 1, 2, 1, 3, 2, 2, 0};
36 std::array<int, 8> preCT {20, 15, 20, 30, 10, 5, 5, 20};
38 std::array<int, 8> postCT {50, 30, 20, 25, 10, 15, 15, 45};
40 for (
auto _ : state) {
46 std::array<int, 8> prios {0, 1, 2, 1, 3, 2, 2, 0};
47 std::array<int, 8> preCT {20, 15, 20, 30, 10, 5, 5, 20};
49 std::array<int, 8> postCT {50, 30, 20, 25, 10, 15, 15, 45};
51 for (
auto _ : state) {
57 std::array<int, 8> prios {0, 1, 2, 1, 3, 2, 2, 0};
58 std::array<int, 8> preCT {2000, 1500, 2000, 3000, 1000, 500, 500, 2000};
60 std::array<int, 8> postCT {5000, 3000, 2000, 2500, 1000, 1500, 1500, 4500};
62 for (
auto _ : state) {
68 std::array<int, 8> prios {0, 1, 2, 1, 3, 2, 2, 0};
69 std::array<int, 8> preCT {2000, 1500, 2000, 3000, 1000, 500, 500, 2000};
71 std::array<int, 8> postCT {5000, 3000, 2000, 2500, 1000, 1500, 1500, 4500};
73 for (
auto _ : state) {
79 std::array<int, 8> prios {0, 1, 2, 1, 3, 2, 2, 0};
80 std::array<int, 8> preCT {200, 150, 200, 300, 100, 50, 50, 200};
82 std::array<int, 8> postCT {500, 300, 200, 250, 100, 150, 150, 450};
84 for (
auto _ : state) {
90 std::array<int, 8> prios {0, 1, 2, 1, 3, 2, 2, 0};
91 std::array<int, 8> preCT {200, 150, 200, 300, 100, 50, 50, 200};
93 std::array<int, 8> postCT {500, 300, 200, 250, 100, 150, 150, 450};
95 for (
auto _ : state) {
101 std::array<int, 8> prios {0, 1, 2, 1, 3, 2, 2, 0};
102 std::array<int, 8> preCT {2000, 1500, 2000, 3000, 1000, 500, 500, 2000};
104 std::array<int, 8> postCT {5000, 3000, 2000, 2500, 1000, 1500, 1500, 4500};
106 for (
auto _ : state) {
112 std::array<int, 8> prios {0, 1, 2, 1, 3, 2, 2, 0};
113 std::array<int, 8> preCT {2000, 1500, 2000, 3000, 1000, 500, 500, 2000};
115 std::array<int, 8> postCT {5000, 3000, 2000, 2500, 1000, 1500, 1500, 4500};
117 for (
auto _ : state) {
The shared_priority_mutex is an advanced synchronization mechanism that enhances the traditional shar...
Definition shared_priority_mutex.hpp:49
void lock(Priority_t const priority=0)
Try to acquire the unique ownership of the shared_priority_mutex, blocking the thread if the shared_p...
Definition shared_priority_mutex.hpp:109
This file contains the all the includes required by the library.
Definition shared_priority_mutex_benchmark.hpp:17
void shared_pipeline_benchmark_fast(benchmark::State &state)
Definition shared_priority_mutex_benchmark.hpp:111
void pipeline_benchmark_gaming(benchmark::State &state)
Definition shared_priority_mutex_benchmark.hpp:56
void lock_unlock_benchmark(benchmark::State &state)
Definition shared_priority_mutex_benchmark.hpp:20
void pipeline_benchmark_audio(benchmark::State &state)
Definition shared_priority_mutex_benchmark.hpp:78
void pipeline_benchmark_long(benchmark::State &state)
Definition shared_priority_mutex_benchmark.hpp:34
void shared_pipeline_benchmark_long(benchmark::State &state)
Definition shared_priority_mutex_benchmark.hpp:45
void shared_pipeline_benchmark_gaming(benchmark::State &state)
Definition shared_priority_mutex_benchmark.hpp:67
void pipeline_benchmark_fast(benchmark::State &state)
Definition shared_priority_mutex_benchmark.hpp:100
void shared_lock_unlock_benchmark(benchmark::State &state)
Definition shared_priority_mutex_benchmark.hpp:27
void shared_pipeline_benchmark_audio(benchmark::State &state)
Definition shared_priority_mutex_benchmark.hpp:89
boost::fairness::shared_priority_mutex< 4 > m
Definition shared_priority_mutex_benchmark.hpp:18
void thread_function(Lockable &lockable, int preCriticalTime, int criticalTime, int postCriticalTime, int p=0)
Definition thread_utils.hpp:26