git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@336 35acf78f-673a-0410-8e92-d51de3d6d3f4

master
gdisirio 2008-07-06 08:45:08 +00:00
parent e09b7c66e7
commit 4507047a83
4 changed files with 47 additions and 7 deletions

View File

@ -82,6 +82,7 @@ Win32-MinGW - ChibiOS/RT simulator and demo into a WIN32 process,
to the chThdCreate().
- 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.
- New benchmark added to the test suite.
- Added the C++ wrapper entries to the documentation.
- Fixed the documentation entry for the chThdCreate() API.

View File

@ -43,6 +43,7 @@ static const struct testcase *tests[] = {
&testbmk3,
&testbmk4,
&testbmk5,
&testbmk6,
NULL
};

View File

@ -191,7 +191,7 @@ const struct testcase testbmk4 = {
static char *bmk5_gettest(void) {
return "Benchmark, I/O Queues throughput";
return "Benchmark, threads creation/termination, optimal";
}
static void bmk5_setup(void) {
@ -201,6 +201,43 @@ static void bmk5_teardown(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 Queue iq;
@ -227,9 +264,9 @@ static void bmk5_execute(void) {
test_println(" bytes/S");
}
const struct testcase testbmk5 = {
bmk5_gettest,
bmk5_setup,
bmk5_teardown,
bmk5_execute
const struct testcase testbmk6 = {
bmk6_gettest,
bmk6_setup,
bmk6_teardown,
bmk6_execute
};

View File

@ -20,6 +20,7 @@
#ifndef _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_ */