ALib C++ Library
Library Version: 2402 R1
Documentation generated by doxygen
Loading...
Searching...
No Matches
ArrayCompressor::Statistics Struct Reference

Description:

Statistic struct to collect information about the performance of different array compression approaches.

Note
While other ALib module provide similar information only in debug compilations of the library, the optional mechanics to collect statistics on array compression (based on this struct) are likewise included in the release version.

Definition at line 343 of file ac.hpp.

#include <ac.hpp>

Public Field Index:

int qtyCompressions =0
 
int qtyReads [QtyAlgorithms] ={}
 
int qtyWins [QtyAlgorithms] ={}
 
Ticks::Duration readTimes [QtyAlgorithms] ={}
 
size_t sumCompressed [QtyAlgorithms] ={}
 
size_t sumCompressedWon [QtyAlgorithms] ={}
 
size_t sumUncompressed =0
 
size_t sumUnCompressedWon [QtyAlgorithms] ={}
 
Ticks::Duration writeTimes [QtyAlgorithms] ={}
 

Public Method Index:

Statisticsoperator+= (const Statistics &other)
 
ALIB_API void Print (AString &result, const String &headline, bool printTotals)
 

Field Details:

◆ qtyCompressions

int qtyCompressions =0

The number of executed compressions.

Definition at line 377 of file ac.hpp.

◆ qtyReads

int qtyReads[QtyAlgorithms] ={}

The number of decompression time of each algorithm.

Definition at line 353 of file ac.hpp.

◆ qtyWins

int qtyWins[QtyAlgorithms] ={}

A counter for the number of times each algorithm was chosen for compression by providing the shortest encoding. The values sum up to field qtyCompressions.

Definition at line 358 of file ac.hpp.

◆ readTimes

Ticks::Duration readTimes[QtyAlgorithms] ={}

The overall decompression time of each algorithm.

Definition at line 350 of file ac.hpp.

◆ sumCompressed

size_t sumCompressed[QtyAlgorithms] ={}

For each algorithm, the sum of resulting bytes of all compressions performed.

Definition at line 361 of file ac.hpp.

◆ sumCompressedWon

size_t sumCompressedWon[QtyAlgorithms] ={}

For each algorithm, the sum of resulting bytes of those compressions where the corresponding algorithm performed best. The values sum up to the overall effective compression length.

Definition at line 366 of file ac.hpp.

◆ sumUncompressed

size_t sumUncompressed =0

The overall given array data to compress.

Definition at line 374 of file ac.hpp.

◆ sumUnCompressedWon

size_t sumUnCompressedWon[QtyAlgorithms] ={}

For each algorithm, the sum of original bytes of those compressions where the corresponding algorithm performed best. The values sum up to the overall uncompressed size given with sumUncompressed.

Definition at line 371 of file ac.hpp.

◆ writeTimes

Ticks::Duration writeTimes[QtyAlgorithms] ={}

The overall compression time of each algorithm.

Definition at line 347 of file ac.hpp.

Method Details:

◆ operator+=()

Statistics & operator+= ( const Statistics & other)
inline

Adds another statistic object to this one.

Parameters
otherThe statistics to add to this one.
Returns
A reference to this object.

Definition at line 385 of file ac.hpp.

◆ Print()

ALIB_WARNINGS_ALLOW_UNSAFE_BUFFER_USAGE void Print ( AString & result,
const String & headline,
bool printTotals )

Writes compression statistics to the given string buffer.

Availability
This method is included only if module ALib BaseCamp is included in the ALib Distribution .
Parameters
resultA string buffer to collect the dump results.
headlineA headline to integrate into the result table.
printTotalsDetermines if a summary line with summed up values should be written.

Definition at line 23 of file ac.cpp.

Here is the call graph for this function:

The documentation for this struct was generated from the following files: