ALib C++ Library
Library Version: 2312 R0
Documentation generated by doxygen
Public Fields | Public Methods | List of all members
ArrayCompressor::Statistics Struct Reference

#include <ac.hpp>

Class 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 344 of file ac.hpp.

Public Fields

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 Methods

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

Member Function Documentation

◆ 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 386 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 Text 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 27 of file ac.cpp.

Here is the call graph for this function:

Member Data Documentation

◆ qtyCompressions

int qtyCompressions =0

The number of executed compressions.

Definition at line 378 of file ac.hpp.

◆ qtyReads

int qtyReads[QtyAlgorithms] ={}

The number of decompression time of each algorithm.

Definition at line 354 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 359 of file ac.hpp.

◆ readTimes

Ticks::Duration readTimes[QtyAlgorithms] ={}

The overall decompression time of each algorithm.

Definition at line 351 of file ac.hpp.

◆ sumCompressed

size_t sumCompressed[QtyAlgorithms] ={}

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

Definition at line 362 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 367 of file ac.hpp.

◆ sumUncompressed

size_t sumUncompressed =0

The overall given array data to compress.

Definition at line 375 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 372 of file ac.hpp.

◆ writeTimes

Ticks::Duration writeTimes[QtyAlgorithms] ={}

The overall compression time of each algorithm.

Definition at line 348 of file ac.hpp.


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