mirror of
https://github.com/amadvance/snapraid.git
synced 2026-11-29 03:16:59 -05:00
Adds new test program for the RAID engine.
This commit is contained in:
parent
0d65497565
commit
81f2fde927
11 changed files with 1394 additions and 26 deletions
9
speed.c
9
speed.c
|
|
@ -30,6 +30,11 @@
|
|||
*/
|
||||
#define TEST_SIZE (256*1024)
|
||||
|
||||
/*
|
||||
* Number of data blocks to test.
|
||||
*/
|
||||
#define TEST_COUNT (8)
|
||||
|
||||
/**
|
||||
* Differential us of two timeval.
|
||||
*/
|
||||
|
|
@ -76,7 +81,7 @@ void speed(int period)
|
|||
int count;
|
||||
int delta = period >= 1000 ? 10 : 1;
|
||||
int size = TEST_SIZE;
|
||||
int nd = 8;
|
||||
int nd = TEST_COUNT;
|
||||
int nv;
|
||||
void *v_alloc;
|
||||
void **v;
|
||||
|
|
@ -89,7 +94,7 @@ void speed(int period)
|
|||
for (i = 0; i < nd; ++i)
|
||||
memset(v[i], i, size);
|
||||
|
||||
/* zero v */
|
||||
/* zero buffer */
|
||||
memset(v[nd+RAID_PARITY_MAX], 0, size);
|
||||
raid_zero(v[nd+RAID_PARITY_MAX]);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue