Helper class for progress logging during time consuming processes.
More...
#include <logutils.hpp>
|
| | 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.
|
|
|
std::vector< int > | groups |
| | Group start/end offsets.
|
|
int | per_chunk |
| | Will log for each per_chunk processed.
|
|
int | max |
| | Total number of its.
|
Helper class for progress logging during time consuming processes.
◆ LoggerHelper()
| LoggerHelper::LoggerHelper |
( |
int | max_, |
|
|
int | chunks, |
|
|
int | minsize ) |
|
inline |
Default constructor.
- Parameters
-
| [in] | max_ | The total number of tasks |
| [in] | chunks | The number of chunks to divide tasks into |
| [in] | minsize | The minimum amount of tasks to enable logging |
◆ group()
| std::pair< int, int > LoggerHelper::group |
( |
int | group | ) |
|
|
inline |
Returns the start and end offsets of a chunk group.
- Parameters
-
| [in] | group | The requested chunk |
◆ log()
| void LoggerHelper::log |
( |
int | it, |
|
|
const std::string & | prefix ) |
|
inline |
Log to the terminal.
- Parameters
-
| [in] | it | Current chunk |
| [in] | prefix | The prefix for the logging |
The documentation for this class was generated from the following file: