-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathdata.h
More file actions
executable file
·161 lines (134 loc) · 3.95 KB
/
data.h
File metadata and controls
executable file
·161 lines (134 loc) · 3.95 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
#include <QString>
#include <unistd.h>
#ifndef DATA_H
#define DATA_H
#define LIGHT_TEST_DESCRIPTION_A "This test performs 1 read and 1 "\
"write sequentially for 20\nseconds."
#define HEAVY_TEST_DESCRIPTION_A "This test performs 3 read and 3 "\
"write sequentially for 20\nseconds."
#define CUSTOM_TEST_DESCRIPTION "Create your custom test. Click on "\
"custom button.\n"\
"WARNING:use only if you know what "\
"you're doing."
#define LIGHT_TEST_DESCRIPTION_S "This test performs 1 read and 1 "\
"write sequentially while a\ncommand "\
"is executed 5 times."
#define HEAVY_TEST_DESCRIPTION_S "This test performs 3 reads and 3 "\
"writes sequentially while a\ncommand "\
"is executed 5 times."
#define BASE_DIR_M "BASE_DIR="
#define NUM_BLOCKS_CREATE_SEQ_M "NUM_BLOCKS_CREATE_SEQ="
const QString PATH_RESULTS = "test_results";
/**
* Tests available
* @AGGR: aggthr-with-greedy_rw.sh
* @STARTUP: comm_startup_lat.sh
* @MULTI_TEST: run_all_tests_1.sh
*/
enum type_test_t{
AGGR,
STARTUP,
ERROR //GESTIRE BENE QUESTO ERROR.
};
/**
* @brief Schedulers available for the tests
*/
enum type_scheduler_t{
BFQ,
CFQ,
NOOP,
DEADLINE
};
/**
* @brief List of commands to lunch when testing I/O
* and start-up time
*/
enum type_command_t{
GNOME,
TERM
};
/**
* @brief Type of Reads and Writes
* @SEQ: Sequential
* @RAND: Random
* @RAW_SEQ/ @RAW_RAND : read directly from the device
* to avoid writing large files repeatedly
*/
enum type_rw_t{
SEQ,
RAND,
RAW_SEQ,
RAW_RAND
};
/**
* @brief Structure that contains the advanced settings
* used in the tests.
* @dir_test: path to the base test directory, where the files are read and
* written to. Default is /var/lib/bfq
*
* @test_time : maximum duration allowed for each test(in seconds)
* @max_startup: maximum duration allowed for each command
* invocation, in seconds.
* @max_ratio: maximum write rate in [Kb/s]
* @sync: invoke sync before starting readers/writers in the scripts
* that allows it
*/
struct advanced_settings_t
{
QString default_dir_bench="benchmark-suite/";
QString dir_test = "/var/lib/bfq";
unsigned int test_time = 20;
unsigned int max_startup = 60;
unsigned int max_rate = 16500;
bool sync = true;
};
/**
* @brief structure that contains the main settings for the test
*
* @type_test: current type of test
* @type_scheduler: current scheduler
* @type_command: current command to execute(if needed)
* @type_rw: current type of Read/Write
*
* @dir_results: path to the directory where the test's results will be stored
*
* @n_iteration: number of test's iterations
* @n_read: number of the reads to do
* @n_write: numeber of the writes to do
* @n_repetition_multi: number of repetitions(used only for @MULTI_TEST)
* @adv_settings struct advanced_settings_t that contains the advanced test settings
*/
struct test_settings_t
{
type_test_t type_test = AGGR;
type_scheduler_t type_scheduler = BFQ;
type_command_t type_command = GNOME;
type_rw_t type_rw = RAW_SEQ;
QString dir_results = ".";
int n_iteration = 5;
int n_read = 1;
int n_write = 1;
/* int n_repetition_multi; */
advanced_settings_t adv_settings;
};
/**
* @brief This is the structure that contains the descriptions of each test.
*/
struct tests_info_t
{
QString aggr_info;
QString comm_info;
};
/**
* @brief This is the scheduler result structure that contains the scheduler
* stats.
*/
struct sched_result_t
{
double throug;
double lat;
double read;
double write;
type_scheduler_t sched;
};
#endif // DATA_H