My Project
Loading...
Searching...
No Matches
LoggerHelper Class Reference

Helper class for progress logging during time consuming processes. More...

#include <logutils.hpp>

Public Member Functions

 LoggerHelper (int max_, int chunks, int minsize)
 Default constructor.
 
std::pair< int, int > group (int group)
 Returns the start and end offsets of a chunk group.
 
void log (int it, const std::string &prefix)
 Log to the terminal.
 

Protected Attributes

std::vector< int > groups
 Group start/end offsets.
 
int per_chunk
 Will log for each per_chunk processed.
 
int max
 Total number of its.
 

Detailed Description

Helper class for progress logging during time consuming processes.

Constructor & Destructor Documentation

◆ LoggerHelper()

LoggerHelper::LoggerHelper ( int  max_,
int  chunks,
int  minsize 
)
inline

Default constructor.

Parameters
[in]max_The total number of tasks
[in]chunksThe number of chunks to divide tasks into
[in]minsizeThe minimum amount of tasks to enable logging

Member Function Documentation

◆ group()

std::pair< int, int > LoggerHelper::group ( int  group)
inline

Returns the start and end offsets of a chunk group.

Parameters
[in]groupThe requested chunk

◆ log()

void LoggerHelper::log ( int  it,
const std::string &  prefix 
)
inline

Log to the terminal.

Parameters
[in]itCurrent chunk
[in]prefixThe prefix for the logging

The documentation for this class was generated from the following file: