#include <linux/aquosa/qos_debug.h>#include <aquosa/qres_lib.h>#include <assert.h>#include <unistd.h>#include <stdio.h>#include <sys/time.h>#include <math.h>#include <pthread.h>Go to the source code of this file.
Defines | |
| #define | QOS_DEBUG_LEVEL QOS_LEVEL_DEBUG |
| #define | ORIG_Q 20000L |
| The original bandwidth assignment. | |
| #define | ORIG_P 100000L |
| #define | RATIO_TOLERANCE 0.15 |
| Tolerance in ratio evaluation set to 10%. | |
Functions | |
| long | count_and_wait () |
| Actively increments a counter and gets time until 1 second is elapsed. | |
| void * | main_loop (void *ptr) |
| int | main () |
Variables | |
| static double | target_ratios [] |
| Bandwidth ratios (with respect to the original assignment) tried by the test program. | |
| qres_params_t | params |
| #define ORIG_P 100000L |
Definition at line 14 of file test-qres-pthreads.c.
| #define ORIG_Q 20000L |
The original bandwidth assignment.
Definition at line 13 of file test-qres-pthreads.c.
| #define QOS_DEBUG_LEVEL QOS_LEVEL_DEBUG |
Definition at line 1 of file test-qres-pthreads.c.
| #define RATIO_TOLERANCE 0.15 |
Tolerance in ratio evaluation set to 10%.
Definition at line 23 of file test-qres-pthreads.c.
Referenced by main(), and main_loop().
| long count_and_wait | ( | ) |
Actively increments a counter and gets time until 1 second is elapsed.
Returns the counter value.
Definition at line 27 of file test-qres-pthreads.c.
References qos_log_debug.
| int main | ( | ) |
Definition at line 93 of file test-qres-pthreads.c.
References main_loop(), qos_chk_exit, qos_chk_ok_exit, qos_log_debug, qres_cleanup(), and qres_init().
| void* main_loop | ( | void * | ptr | ) |
Definition at line 43 of file test-qres-pthreads.c.
References count_and_wait(), ORIG_Q, qres_params_t::P, params, qres_params_t::Q, qos_chk_ok_exit, qos_log_debug, qos_log_err, qres_attach_thread(), qres_create_server(), qres_destroy_server(), qres_set_params(), QRES_TIME_FMT, RATIO_TOLERANCE, sid, and target_ratios.
Definition at line 86 of file test-qres-pthreads.c.
double target_ratios[] [static] |
{
0.5, 0.3, 0.1
}
Bandwidth ratios (with respect to the original assignment) tried by the test program.
Definition at line 18 of file test-qres-pthreads.c.
Referenced by main_loop().
1.6.3