10# if !defined(HPP_AWORX_ALIB_BITBUFFER_AC_V1)
13# if ALIB_CAMP && !defined(HPP_ALIB_LANG_FORMAT_FORMATTER)
18namespace alib {
namespace bitbuffer {
namespace ac_v1 {
23void ArrayCompressor::Statistics::Print(
AString& result,
const String& headline,
bool printTotals)
27 Ticks::Duration tWrite;
28 Ticks::Duration tRead;
31 size_t winnerSizes= 0;
34 result <<
"-------------------------------------------------------------------\n";
35 fmt->Format( result,
"{} ({} arrays compressed)\n", headline,
qtyCompressions );
36 fmt->Format( result,
A_WCHAR(
"#Algo \u2205writeTime \u2205readTime \u2205 Size \u2205 Sz-Won wins\n" ));
37 result <<
"-------------------------------------------------------------------\n";
42 fmt->Format( sizeWhenWon,
"{:f5.1}%",
50 fmt->Format( avgReadTime,
"{:>11,}",
57 "{:13} {:>8,} {:>11} {:f5.1}% {:>6} {:f3.0}% ({:4})\n"
58 , ToBitwiseEnumeration<Algorithm>( algoNo )
81 "Error in ArrayCompressor::ExecutionStats: "
82 "#algo wins do not sum up to #compressions: ",
86 result <<
" -----------------------------------------------------------\n";
88 fmt->Format( result,
" Totals:{:>7,} {:>11,} {:f5.1}% {:f5.1}%\n"
static constexpr int QtyAlgorithms
The number of algorithms implemented.
#define ALIB_WARNINGS_RESTORE
#define ALIB_ASSERT_ERROR(cond,...)
#define ALIB_WARNINGS_ALLOW_UNSAFE_BUFFER_USAGE
#define ALIB_CALLER_PRUNED
NLocalString< 128 > NString128
Type alias name for TLocalString<nchar,128> .
constexpr CString NewLine()
size_t sumCompressedWon[QtyAlgorithms]
Ticks::Duration writeTimes[QtyAlgorithms]
size_t sumUnCompressedWon[QtyAlgorithms]
int qtyWins[QtyAlgorithms]
int qtyReads[QtyAlgorithms]
Ticks::Duration readTimes[QtyAlgorithms]
size_t sumCompressed[QtyAlgorithms]