8#if !defined(ALIB_C20_MODULES) || ((ALIB_C20_MODULES != 0) && (ALIB_C20_MODULES != 1))
9# error "Symbol ALIB_C20_MODULES has to be given to the compiler as either 0 or 1"
32void ArrayCompressor::Statistics::Print(
AString& result,
const String& headline,
bool printTotals)
38 Ticks::Duration tWrite;
39 Ticks::Duration tRead;
42 size_t winnerSizes= 0;
45 result <<
"-------------------------------------------------------------------\n";
47 fmt.
Format( result,
A_WCHAR(
"#Algo \u2205writeTime \u2205readTime \u2205 Size \u2205 Sz-Won wins\n" ));
48 result <<
"-------------------------------------------------------------------\n";
53 fmt.
Format( sizeWhenWon,
"{:f5.1}%",
60 fmt.
Format( avgReadTime,
"{:>11,}",
66 "{:13} {:>8,} {:>11} {:f5.1}% {:>6} {:f3.0}% ({:4})\n"
67 , ToBitwiseEnumeration<Algorithm>( algoNo )
84 "Error in ArrayCompressor::ExecutionStats: #algo wins do not sum up to #compressions: {} != ",
88 result <<
" -----------------------------------------------------------\n";
90 fmt.
Format( result,
" Totals:{:>7,} {:>11,} {:f5.1}% {:f5.1}%\n"
static constexpr int NumberOfAlgorithms
The number of algorithms implemented.
#define ALIB_LOCK_RECURSIVE_WITH(lock)
#define ALIB_ASSERT_ERROR(cond, domain,...)
strings::TAString< character, lang::HeapAllocator > AString
Type alias in namespace alib.
LocalString< 128 > String128
Type alias name for TLocalString<character,128>.
format::Formatter Formatter
Type alias in namespace alib.
strings::TString< character > String
Type alias in namespace alib.
int ctdCompressions
The number of executed compressions.
size_t sumUnCompressedWon[NumberOfAlgorithms]
size_t sumCompressed[NumberOfAlgorithms]
For each algorithm, the sum of resulting bytes of all compressions performed.
int ctdWins[NumberOfAlgorithms]
Ticks::Duration readTimes[NumberOfAlgorithms]
The overall decompression time of each algorithm.
size_t sumCompressedWon[NumberOfAlgorithms]
int ctdReads[NumberOfAlgorithms]
The number of measured decompression runs of each algorithm.
size_t sumUncompressed
The overall given array data to compress.
Ticks::Duration writeTimes[NumberOfAlgorithms]
The overall compression time of each algorithm.