Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members

InputreaderTester Class Reference

This class is for testing the input managers. More...

#include <InputreaderTester.hpp>

List of all members.

Public Member Functions

void usageSimpleInput ()
 Prints out the useage of this class.
void doTest (int argc, char *argv[])
 The main function.

Private Member Functions

template<class F_R>
void selectReader (char *reader, char *file_name, unsigned int nr_of_scan, std::streamsize lowlevel_buffer_size)
 This function will select the reader used in the test.
template<class T_R>
void readDatabase (char *file_name, unsigned int nr_of_scan, std::streamsize lowlevel_buffer_size)
 This function will read in the transactions.


Detailed Description

This class is for testing the input managers.

In this context testing means reading in all the transactions of a transactional database. To select the best transaction reader run testers/input-tester with different parameters, and measure the times, for example by using /usr/bin/time.

The read in transactions are neither stored nor used for anything. A temporal transaction is always overwritten with the new transaction. Also, this class does not check if the transaction reader works properly. If you want to check, compile the program with DEBUG_LEVEL >= LEVEL_DBG (i.e. make input-reader DEBUG_LEVEL=255) and check if the output is the same as the tranasction database. For example:

./testers/input-tester stream simple ../data/T10I4D100K.dat 8000 1 | diff - ../data/T10I4D100K.dat

Note that a transaction reader may change the order of item in a transaction, or in some databases the white space after the last items of all/some transactions are ommited, and hence the output may differ from the transactional database.

Definition at line 41 of file InputreaderTester.hpp.


Member Function Documentation

void InputreaderTester::doTest int  argc,
char *  argv[]
 

The main function.

Definition at line 23 of file InputreaderTester.cpp.

References usageSimpleInput().

Referenced by main().

template<class T_R>
void InputreaderTester::readDatabase char *  file_name,
unsigned int  nr_of_scan,
std::streamsize  lowlevel_buffer_size
[private]
 

This function will read in the transactions.

Parameters:
file_name the name of the file that contains the transactions
nr_of_scan the number the transaction datebase has to be read through
lowlevel_buffer_size the low level buffer size

Definition at line 96 of file InputreaderTester.hpp.

References FileReprBase::READ.

template<class F_R>
void InputreaderTester::selectReader char *  reader,
char *  file_name,
unsigned int  nr_of_scan,
std::streamsize  lowlevel_buffer_size
[private]
 

This function will select the reader used in the test.

Parameters:
reader the name of the reader that has to be tested
file_name the name of the file that contains the transactions
nr_of_scan the number the transaction datebase has to be read through
lowlevel_buffer_size the low level buffer size

Definition at line 69 of file InputreaderTester.hpp.

References usageSimpleInput().

void InputreaderTester::usageSimpleInput  ) 
 

Prints out the useage of this class.

Author:
Ferenc Bodon

Definition at line 14 of file InputreaderTester.cpp.

Referenced by doTest(), and selectReader().


The documentation for this class was generated from the following files:
Generated on Sun Sep 17 17:55:22 2006 for FIM environment by  doxygen 1.4.4