iPXE
|
Profiling self-tests. More...
Go to the source code of this file.
Data Structures | |
struct | profile_test |
A profiling test. More... | |
Macros | |
#define | DATA(...) { __VA_ARGS__ } |
Define inline data. More... | |
#define | PROFILE_TEST(name, MEAN, STDDEV, SAMPLES) |
Define a profiling test. More... | |
#define | profile_ok(test) profile_okx ( test, __FILE__, __LINE__ ) |
Functions | |
FILE_LICENCE (GPL2_OR_LATER_OR_UBDL) | |
PROFILE_TEST (empty, 0, 0, DATA()) | |
Empty data set. More... | |
PROFILE_TEST (zero, 0, 0, DATA(0)) | |
Single-element data set (zero) More... | |
PROFILE_TEST (single, 42, 0, DATA(42)) | |
Single-element data set (non-zero) More... | |
PROFILE_TEST (identical, 69, 0, DATA(69, 69, 69, 69, 69, 69, 69)) | |
Multiple identical element data set. More... | |
PROFILE_TEST (small, 5, 2, DATA(3, 5, 9, 4, 3, 2, 5, 7)) | |
Small element data set. More... | |
PROFILE_TEST (random, 70198, 394, DATA(69772, 70068, 70769, 69653, 70663, 71078, 70101, 70341, 70215, 69600, 70020, 70456, 70421, 69972, 70267, 69999, 69972)) | |
Random data set. More... | |
PROFILE_TEST (large, 93533894UL, 25538UL, DATA(93510333UL, 93561169UL, 93492361UL, 93528647UL, 93557566UL, 93503465UL, 93540126UL, 93549020UL, 93502307UL, 93527320UL, 93537152UL, 93540125UL, 93550773UL, 93586731UL, 93521312UL)) | |
Large-valued random data set. More... | |
static void | profile_okx (struct profile_test *test, const char *file, unsigned int line) |
Report a profiling test result. More... | |
static void | profile_test_exec (void) |
Perform profiling self-tests. More... | |
Variables | |
struct self_test profile_test | __self_test |
Profiling self-test. More... | |
Profiling self-tests.
Definition in file profile_test.c.
#define DATA | ( | ... | ) | { __VA_ARGS__ } |
Define inline data.
Definition at line 53 of file profile_test.c.
#define PROFILE_TEST | ( | name, | |
MEAN, | |||
STDDEV, | |||
SAMPLES | |||
) |
#define profile_ok | ( | test | ) | profile_okx ( test, __FILE__, __LINE__ ) |
Definition at line 122 of file profile_test.c.
FILE_LICENCE | ( | GPL2_OR_LATER_OR_UBDL | ) |
PROFILE_TEST | ( | empty | , |
0 | , | ||
0 | , | ||
DATA() | |||
) |
Empty data set.
PROFILE_TEST | ( | zero | , |
0 | , | ||
0 | , | ||
DATA(0) | |||
) |
Single-element data set (zero)
PROFILE_TEST | ( | single | , |
42 | , | ||
0 | , | ||
DATA(42) | |||
) |
Single-element data set (non-zero)
PROFILE_TEST | ( | identical | , |
69 | , | ||
0 | , | ||
DATA(69, 69, 69, 69, 69, 69, 69) | |||
) |
Multiple identical element data set.
PROFILE_TEST | ( | small | , |
5 | , | ||
2 | , | ||
DATA(3, 5, 9, 4, 3, 2, 5, 7) | |||
) |
Small element data set.
PROFILE_TEST | ( | random | , |
70198 | , | ||
394 | , | ||
DATA(69772, 70068, 70769, 69653, 70663, 71078, 70101, 70341, 70215, 69600, 70020, 70456, 70421, 69972, 70267, 69999, 69972) | |||
) |
Random data set.
PROFILE_TEST | ( | large | , |
93533894UL | , | ||
25538UL | , | ||
DATA(93510333UL, 93561169UL, 93492361UL, 93528647UL, 93557566UL, 93503465UL, 93540126UL, 93549020UL, 93502307UL, 93527320UL, 93537152UL, 93540125UL, 93550773UL, 93586731UL, 93521312UL) | |||
) |
Large-valued random data set.
|
static |
Report a profiling test result.
test | Profiling test |
file | Test code file |
line | Test code line |
Definition at line 101 of file profile_test.c.
References DBGC, profiler::mean, memset(), okx, profile_mean(), profile_stddev(), profile_update(), and test.
|
static |
Perform profiling self-tests.
Definition at line 128 of file profile_test.c.
References profile_ok, and random().
struct self_test profile_test __self_test |
Profiling self-test.
Definition at line 141 of file profile_test.c.