"Fossies" - the Fresh Open Source Software Archive 
Member "bonnie++-2.00a/bonnie.h" (22 Sep 2020, 1435 Bytes) of package /linux/privat/bonnie++-2.00a.tgz:
As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style:
standard) with prefixed line numbers and
code folding option.
Alternatively you can here
view or
download the uninterpreted source code file.
For more information about "bonnie.h" see the
Fossies "Dox" file reference documentation and the last
Fossies "Diffs" side-by-side code changes report:
1.03e_vs_1.04.
1 #ifndef BONNIE
2 #define BONNIE
3
4 using namespace std;
5
6 #define BON_VERSION "2.00"
7 #define CSV_VERSION "1.98"
8
9 #include "port.h"
10 #include <stdio.h>
11 #include <sys/types.h>
12 #include <sys/stat.h>
13 #include <fcntl.h>
14
15 typedef FILE *PFILE;
16
17 #define SemKey 4711
18 #define NumSems TestCount
19 // 9 billion files (10) + up to 12 random extra chars
20 #define RandExtraLen (12)
21 #define MaxNameLen (10 + RandExtraLen)
22 // data includes index to which directory (6 bytes) and terminating '\0' for
23 // the name and pointer to file name
24 #define MaxDataPerFile (MaxNameLen + 6 + 1 + sizeof(void *))
25 #define MinTime (0.5)
26 #define DefaultSeeks (8192)
27 #define UpdateSeek (10)
28 #define DefaultSeekProcCount (5)
29 #define DefaultChunkBits (13)
30 #define DefaultChunkSize (1 << DefaultChunkBits)
31 #define UnitBits (20)
32 #define Unit (1 << UnitBits)
33 #define CreateNameLen 6
34 #define DefaultFileSize 300
35 #define DirectoryUnit 1024
36 #define DefaultDirectorySize 16
37 #define DefaultDirectoryMaxSize 0
38 #define DefaultDirectoryMinSize 0
39 #define DefaultByteIO 3
40
41 enum tests_t
42 {
43 ByteWrite = 0,
44 FastWrite,
45 ReWrite,
46 ByteRead,
47 FastRead,
48 Lseek,
49 CreateSeq,
50 StatSeq,
51 DelSeq,
52 CreateRand,
53 StatRand,
54 DelRand,
55 TestCount
56 };
57
58 int io_error(CPCCHAR message, bool do_exit = false);
59 int bon_setugid(CPCCHAR user, CPCCHAR group, bool quiet);
60 unsigned int size_from_str(CPCCHAR str, CPCCHAR conv);
61
62 typedef enum
63 {
64 eNoErr = 0,
65 eParam = 1,
66 eCtrl_C = 5
67 } ERROR_TYPE;
68
69 #endif