root / synthbench / bonnie++ / bonnie.h @ 0:839f52ef7657
History | View | Annotate | Download (1.4 kB)
1 | 0:839f52ef7657 | louridas | #ifndef BONNIE
|
---|---|---|---|
2 | 0:839f52ef7657 | louridas | #define BONNIE
|
3 | 0:839f52ef7657 | louridas | |
4 | 0:839f52ef7657 | louridas | #define BON_VERSION "1.03d" |
5 | 0:839f52ef7657 | louridas | |
6 | 0:839f52ef7657 | louridas | #include "conf.h" |
7 | 0:839f52ef7657 | louridas | #include "port.h" |
8 | 0:839f52ef7657 | louridas | |
9 | 0:839f52ef7657 | louridas | #define SemKey 4711 |
10 | 0:839f52ef7657 | louridas | #define NumSems TestCount
|
11 | 0:839f52ef7657 | louridas | // million files (7) + up to 12 random extra chars
|
12 | 0:839f52ef7657 | louridas | #define RandExtraLen (12) |
13 | 0:839f52ef7657 | louridas | #define MaxNameLen (7 + RandExtraLen) |
14 | 0:839f52ef7657 | louridas | // data includes index to which directory (6 bytes) and terminating '\0' for
|
15 | 0:839f52ef7657 | louridas | // the name and pointer to file name
|
16 | 0:839f52ef7657 | louridas | #define MaxDataPerFile (MaxNameLen + 6 + 1 + 4) |
17 | 0:839f52ef7657 | louridas | #define MinTime (0.5) |
18 | 0:839f52ef7657 | louridas | #define Seeks (8192) |
19 | 0:839f52ef7657 | louridas | #define UpdateSeek (10) |
20 | 0:839f52ef7657 | louridas | #define SeekProcCount (3) |
21 | 0:839f52ef7657 | louridas | #define DefaultChunkBits (13) |
22 | 0:839f52ef7657 | louridas | #define DefaultChunkSize (1 << DefaultChunkBits) |
23 | 0:839f52ef7657 | louridas | #define UnitBits (20) |
24 | 0:839f52ef7657 | louridas | #define Unit (1 << UnitBits) |
25 | 0:839f52ef7657 | louridas | #define CreateNameLen 6 |
26 | 0:839f52ef7657 | louridas | #define DefaultFileSize 300 |
27 | 0:839f52ef7657 | louridas | #define DirectoryUnit 1024 |
28 | 0:839f52ef7657 | louridas | #define DefaultDirectorySize 16 |
29 | 0:839f52ef7657 | louridas | #define DefaultDirectoryMaxSize 0 |
30 | 0:839f52ef7657 | louridas | #define DefaultDirectoryMinSize 0 |
31 | 0:839f52ef7657 | louridas | // 1024M per file for IO.
|
32 | 0:839f52ef7657 | louridas | #define IOFileSize 1024 |
33 | 0:839f52ef7657 | louridas | // 3 digits
|
34 | 0:839f52ef7657 | louridas | #define MaxIOFiles 1000 |
35 | 0:839f52ef7657 | louridas | |
36 | 0:839f52ef7657 | louridas | typedef const char * PCCHAR; |
37 | 0:839f52ef7657 | louridas | typedef char * PCHAR; |
38 | 0:839f52ef7657 | louridas | typedef PCHAR const CPCHAR; |
39 | 0:839f52ef7657 | louridas | typedef PCCHAR const CPCCHAR; |
40 | 0:839f52ef7657 | louridas | typedef void * PVOID; |
41 | 0:839f52ef7657 | louridas | typedef PVOID const CPVOID; |
42 | 0:839f52ef7657 | louridas | typedef const CPVOID CPCVOID; |
43 | 0:839f52ef7657 | louridas | |
44 | 0:839f52ef7657 | louridas | enum tests_t
|
45 | 0:839f52ef7657 | louridas | { |
46 | 0:839f52ef7657 | louridas | Putc = 0,
|
47 | 0:839f52ef7657 | louridas | FastWrite, |
48 | 0:839f52ef7657 | louridas | ReWrite, |
49 | 0:839f52ef7657 | louridas | Getc, |
50 | 0:839f52ef7657 | louridas | FastRead, |
51 | 0:839f52ef7657 | louridas | Lseek, |
52 | 0:839f52ef7657 | louridas | CreateSeq, |
53 | 0:839f52ef7657 | louridas | StatSeq, |
54 | 0:839f52ef7657 | louridas | DelSeq, |
55 | 0:839f52ef7657 | louridas | CreateRand, |
56 | 0:839f52ef7657 | louridas | StatRand, |
57 | 0:839f52ef7657 | louridas | DelRand, |
58 | 0:839f52ef7657 | louridas | TestCount |
59 | 0:839f52ef7657 | louridas | }; |
60 | 0:839f52ef7657 | louridas | |
61 | 0:839f52ef7657 | louridas | int io_error(CPCCHAR message, bool do_exit = false); |
62 | 0:839f52ef7657 | louridas | int bon_setugid(CPCCHAR user, CPCCHAR group, bool quiet); |
63 | 0:839f52ef7657 | louridas | |
64 | 0:839f52ef7657 | louridas | #endif |