"Fossies" - the Fresh Open Source Software Archive

Member "bonnie++-1.04/bonnie.h" (5 Sep 2017, 1464 Bytes) of package /linux/privat/bonnie++_1.04.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 latest Fossies "Diffs" side-by-side code changes report: 1.03e_vs_1.04.

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