ewmscp
..
|
class for checking if checksums match expectations Extends the copyRequest::base class with new printResults function that checks if sums match expected values and prints results in a way compatible with e.g. More...
Public Member Functions | |
checksumTest (const std::string &aSource, std::unique_ptr< const genericStat > &aStat, inputHandler::base *aInputHandler) | |
void | printResults (std::ostream &, std::ostream &logStream) override |
![]() | |
const genericStat & | getInitialStat () const |
const std::string & | getSource () const |
clock_type::duration | getAdvisedDelay () const |
returns the advised delay More... | |
void | registerIterator (decltype(filesInWorkIterator) iter) |
decltype(filesInWorkIterator) | getFilesInWorkIteraror () const |
fileInWork::slotTypes | getSlotType () const |
void | changeRequestType (stateBitType newType) |
base (inputHandler::base *InputHandler, const std::string &aSource, const std::string &aDestination, std::unique_ptr< const genericStat > &aStat, const singleMap &aMapEntry, bool remove, clock_type::time_point timestamp) | |
constructor for copy,link and remove requests. More... | |
base (inputHandler::base *InputHandler, const std::string &aSource, const std::string &aDestination, const singleMap &aMapEntry, bool remove, clock_type::time_point timestamp) | |
constructor for copy,link and remove requests. More... | |
base (inputHandler::base *InputHandler, const std::string &aSource, const std::string &aDestination, const std::string &aMoveSource, const std::string &aOrigSource, const singleMap &aMapEntry, clock_type::time_point timestamp) | |
constructor for rename requests only. More... | |
virtual | ~base () noexcept(false) |
virtual void | process (perThreadData &threadData) |
const std::string & | getSuffix () const |
void | addExpectedChecksumResult (const std::string &checkSumType, const std::string &expectedValue) |
void | kw_size (std::string &value) const |
void | kw_mtime (std::string &value) const |
void | kw_inow (std::string &value) const |
void | kw_now (std::string &value) const |
void | kw_version (std::string &value) const |
void | kw_commit (std::string &value) const |
void | kw_prefix (std::string &value) const |
void | kw_reason (std::string &value) const |
void | kw_state (std::string &value) const |
void | kw_finishtime (std::string &value) const |
Static Public Member Functions | |
static void | printFinalLine (std::ostream &stream) |
static void | prepareStatPrint () |
setup statPrinter to print the final line for compatibiity mith eg. md5sum More... | |
![]() | |
static std::map< std::string, void(base::*)(std::string &) const > & | keywordMap () |
static bool | adviseDelay (clock_type::duration dt, const std::string &suffix) |
update the advised delay in the map. More... | |
static void | printStats (std::ostream &stream) |
static void | resetStats () |
static bool | retry (std::unique_ptr< base > &request, timedQueue &delayedRequests) |
static void | waitForAllInstancesGone () |
static bool | checkForInstances () |
static std::function< void(std::ostream &)> & | getStatPrinter () |
we can't have static functions virtual, so we explicitly use a function to give us the proper print function, which can be changed in derived classes. More... | |
static void | setStatPrinter (void(*f)(std::ostream &)) |
static void | processQueue (simpleQueue &queue, simpleQueue &resultQueue, timedQueue &delayedRequests) |
static void | getSuffix (const std::string &path, std::string &suffix) |
Static Protected Attributes | |
static options::single< bool > | exitOnMismatch |
static unsigned int | numberOfMismatches |
static singleMap | mapEntry |
![]() | |
static statCollector::typed< decltype(tWorkDone - tInotify) > | tTotalStat |
static statCollector::typed< decltype(tWorkDone - tInotify) > | tTotal2Stat |
static statCollector::typed< decltype(tWorkDone - tInotify) > | tInotifyStat |
static statCollector::typed< decltype(tEnqueue - tInotify) > | tPipeStat |
static statCollector::typed< decltype(tWorkStart - tEnqueue) > | tWaitStat |
static statCollector::typed< decltype(tWorkDone - tWorkStart) > | tCopyStat |
static statCollector::typed< decltype(readInitialStat->size) > | bytesStat |
static statCollector::typed< double > | speedStat |
static clock_type::time_point | tProgramStart |
static std::atomic< unsigned int > | nConcurrentProcesses |
static options::single< double > | maxDelayTime |
static std::function< void(std::ostream &)> | statPrinter |
Additional Inherited Members | |
![]() | |
decltype(fileInWork::filesInWork.begin()) | filesInWorkIterator = fileInWork::filesInWork.end() |
![]() | |
static options::single< bool > | setAttributesAfterClose |
static options::single< bool > | perFileThreads |
static options::single< size_t > | userWriteBlockSize |
static options::single< size_t > | userReadBlockSize |
static options::single< size_t > | maxMemoryBlockSize |
static options::single< size_t > | minMemoryBlockSize |
static statCollector::typed< copyRequest::clock_type::duration > | tEnqueueStat |
static std::vector< std::atomic< unsigned int > > * | processMultiplicities |
![]() | |
void | adviseDelay (clock_type::duration dt=clock_type::duration::zero()) |
![]() | |
std::unique_ptr< const genericStat > | readInitialStat |
std::list< checksum::base * > | checkSums |
perThreadData * | threadData |
stateType | state |
std::string | errorMessage |
const std::string | source |
const std::string | destination |
const std::string | moveSource |
const std::string | origSource |
const singleMap & | mapEntry |
std::string | suffix |
std::string | prefix |
size_t | memoryBlockSize |
clock_type::time_point | tInotify |
clock_type::time_point | tEnqueue |
clock_type::time_point | tWorkStart |
clock_type::time_point | tWorkDone |
unsigned | retries |
class for checking if checksums match expectations Extends the copyRequest::base class with new printResults function that checks if sums match expected values and prints results in a way compatible with e.g.
md5sum command.
Definition at line 31 of file checksumTestRequestProvider.cpp.
|
inline |
Definition at line 37 of file checksumTestRequestProvider.cpp.
|
inlinestatic |
setup statPrinter to print the final line for compatibiity mith eg. md5sum
Definition at line 69 of file checksumTestRequestProvider.cpp.
References printFinalLine(), and copyRequest::base::statPrinter.
Referenced by checksumTestRequestProvider::processSource().
|
inlinestatic |
Definition at line 59 of file checksumTestRequestProvider.cpp.
References exitOnMismatch, and numberOfMismatches.
Referenced by prepareStatPrint().
|
inlineoverridevirtual |
Reimplemented from copyRequest::base.
Definition at line 41 of file checksumTestRequestProvider.cpp.
References copyRequest::base::checkSums, escapism::newEscaper(), numberOfMismatches, quiet, and copyRequest::base::source.
|
staticprotected |
Definition at line 33 of file checksumTestRequestProvider.cpp.
Referenced by printFinalLine().
|
staticprotected |
Definition at line 35 of file checksumTestRequestProvider.cpp.
|
staticprotected |
Definition at line 34 of file checksumTestRequestProvider.cpp.
Referenced by printFinalLine(), and printResults().