git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@336 35acf78f-673a-0410-8e92-d51de3d6d3f4
parent
e09b7c66e7
commit
4507047a83
|
@ -82,6 +82,7 @@ Win32-MinGW - ChibiOS/RT simulator and demo into a WIN32 process,
|
||||||
to the chThdCreate().
|
to the chThdCreate().
|
||||||
- OPT: Improvements to the test framework, now a virtual timer is used instead
|
- OPT: Improvements to the test framework, now a virtual timer is used instead
|
||||||
of software loops into the bechmarks in order to have more stable results.
|
of software loops into the bechmarks in order to have more stable results.
|
||||||
|
- New benchmark added to the test suite.
|
||||||
- Added the C++ wrapper entries to the documentation.
|
- Added the C++ wrapper entries to the documentation.
|
||||||
- Fixed the documentation entry for the chThdCreate() API.
|
- Fixed the documentation entry for the chThdCreate() API.
|
||||||
|
|
||||||
|
|
|
@ -43,6 +43,7 @@ static const struct testcase *tests[] = {
|
||||||
&testbmk3,
|
&testbmk3,
|
||||||
&testbmk4,
|
&testbmk4,
|
||||||
&testbmk5,
|
&testbmk5,
|
||||||
|
&testbmk6,
|
||||||
NULL
|
NULL
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -191,7 +191,7 @@ const struct testcase testbmk4 = {
|
||||||
|
|
||||||
static char *bmk5_gettest(void) {
|
static char *bmk5_gettest(void) {
|
||||||
|
|
||||||
return "Benchmark, I/O Queues throughput";
|
return "Benchmark, threads creation/termination, optimal";
|
||||||
}
|
}
|
||||||
|
|
||||||
static void bmk5_setup(void) {
|
static void bmk5_setup(void) {
|
||||||
|
@ -201,6 +201,43 @@ static void bmk5_teardown(void) {
|
||||||
}
|
}
|
||||||
|
|
||||||
static void bmk5_execute(void) {
|
static void bmk5_execute(void) {
|
||||||
|
|
||||||
|
uint32_t n = 0;
|
||||||
|
void *wap = wa[0];
|
||||||
|
tprio_t prio = chThdGetPriority() + 1;
|
||||||
|
test_wait_tick();
|
||||||
|
test_start_timer(1000);
|
||||||
|
do {
|
||||||
|
chThdCreateFast(prio, wap, STKSIZE, thread2);
|
||||||
|
n++;
|
||||||
|
#if defined(WIN32)
|
||||||
|
ChkIntSources();
|
||||||
|
#endif
|
||||||
|
} while (!test_timer_done);
|
||||||
|
test_print("--- Score : ");
|
||||||
|
test_printn(n);
|
||||||
|
test_println(" threads/S");
|
||||||
|
}
|
||||||
|
|
||||||
|
const struct testcase testbmk5 = {
|
||||||
|
bmk5_gettest,
|
||||||
|
bmk5_setup,
|
||||||
|
bmk5_teardown,
|
||||||
|
bmk5_execute
|
||||||
|
};
|
||||||
|
|
||||||
|
static char *bmk6_gettest(void) {
|
||||||
|
|
||||||
|
return "Benchmark, I/O Queues throughput";
|
||||||
|
}
|
||||||
|
|
||||||
|
static void bmk6_setup(void) {
|
||||||
|
}
|
||||||
|
|
||||||
|
static void bmk6_teardown(void) {
|
||||||
|
}
|
||||||
|
|
||||||
|
static void bmk6_execute(void) {
|
||||||
static uint8_t ib[16];
|
static uint8_t ib[16];
|
||||||
static Queue iq;
|
static Queue iq;
|
||||||
|
|
||||||
|
@ -227,9 +264,9 @@ static void bmk5_execute(void) {
|
||||||
test_println(" bytes/S");
|
test_println(" bytes/S");
|
||||||
}
|
}
|
||||||
|
|
||||||
const struct testcase testbmk5 = {
|
const struct testcase testbmk6 = {
|
||||||
bmk5_gettest,
|
bmk6_gettest,
|
||||||
bmk5_setup,
|
bmk6_setup,
|
||||||
bmk5_teardown,
|
bmk6_teardown,
|
||||||
bmk5_execute
|
bmk6_execute
|
||||||
};
|
};
|
||||||
|
|
|
@ -20,6 +20,7 @@
|
||||||
#ifndef _TESTBMK_H_
|
#ifndef _TESTBMK_H_
|
||||||
#define _TESTBMK_H_
|
#define _TESTBMK_H_
|
||||||
|
|
||||||
extern const struct testcase testbmk1, testbmk2, testbmk3, testbmk4, testbmk5;
|
extern const struct testcase testbmk1, testbmk2, testbmk3,
|
||||||
|
testbmk4, testbmk5, testbmk6;
|
||||||
|
|
||||||
#endif /* _TESTBMK_H_ */
|
#endif /* _TESTBMK_H_ */
|
||||||
|
|
Loading…
Reference in New Issue