"Fossies" - the Fresh Open Source Software Archive

Member "bonnie++-2.00a/bon_file.h" (23 Dec 2008, 1560 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 "bon_file.h" see the Fossies "Dox" file reference documentation.

    1 #ifndef BON_IO
    2 #define BON_IO
    3 
    4 #include "bonnie.h"
    5 class BonTimer;
    6 class Rand;
    7 
    8 typedef unsigned long MASK_TYPE;
    9 
   10 class COpenTest
   11 {
   12 public:
   13   COpenTest(int chunk_size, bool use_sync, bool *doExit);
   14   ~COpenTest();
   15 
   16   int create(CPCCHAR dirname, BonTimer &timer, int num, int max_size
   17                     , int min_size, int num_directories, bool do_random);
   18   int delete_random(BonTimer &timer);
   19   int delete_sequential(BonTimer &timer);
   20   int stat_random(BonTimer &timer);
   21   int stat_sequential(BonTimer &timer);
   22 
   23 private:
   24   void make_names(Rand &r, bool do_random);
   25   int stat_file(CPCCHAR file);
   26   int create_a_file(const char *filename, char *buf, int size, int dir);
   27   int create_a_link(const char *original, const char *filename, int dir);
   28 
   29   const int m_chunk_size;
   30   int m_number; // the total number of files to create
   31   int m_number_directories; // the number of directories to store files in
   32   int m_max; // maximum file size (negative for links)
   33   int m_min; // minimum file size
   34   int m_size_range; // m_max - m_min
   35   char *m_dirname; // name of the master directory
   36   char *m_file_name_buf; // buffer to store all file names
   37   char **m_file_names; // pointer to entries in m_file_name_buf
   38   bool m_sync; // do we sync after every significant operation?
   39   FILE_TYPE *m_directoryHandles; // handles to the directories for m_sync
   40   int *m_dirIndex; // which directory we are in
   41   char *m_buf;
   42   bool *m_exit;
   43   bool m_sync_dir;
   44 
   45   void random_sort(Rand &r);
   46 
   47   COpenTest(const COpenTest &t);
   48   COpenTest & operator =(const COpenTest &t);
   49 };
   50 
   51 #endif