ATLAS Offline Software
Loading...
Searching...
No Matches
SG::ArenaAllocatorBase::Stats Struct Reference

Statistics for an allocator. More...

#include <ArenaAllocatorBase.h>

Collaboration diagram for SG::ArenaAllocatorBase::Stats:

Classes

struct  Stat
 A single statistic. More...

Public Member Functions

 Stats ()=default
void clear ()
 Reset to zero.
Stats & operator+= (const Stats &other)
 Accumulate.

Static Public Member Functions

static void header (std::ostream &os)
 Print report header.

Public Attributes

Stat blocks
 Counts of blocks.
Stat elts
 Counts of elements.
Stat bytes
 Counts of bytes.

Detailed Description

Statistics for an allocator.

See above for more details.

Definition at line 189 of file ArenaAllocatorBase.h.

Constructor & Destructor Documentation

◆ Stats()

SG::ArenaAllocatorBase::Stats::Stats ( )
default

Member Function Documentation

◆ clear()

void SG::ArenaAllocatorBase::Stats::clear ( )

Reset to zero.

Zero a complete statistics block.

Definition at line 73 of file ArenaAllocatorBase.cxx.

74{
75 elts.clear();
76 bytes.clear();
77 blocks.clear();
78}

◆ header()

void SG::ArenaAllocatorBase::Stats::header ( std::ostream & os)
static

Print report header.

Write a header for the statistics report.

Parameters
osThe stream to which to write.

Definition at line 112 of file ArenaAllocatorBase.cxx.

113{
114 std::print (os, "Elts InUse/Free/Total"
115 " Bytes InUse/Free/Total Blocks InUse/Free/Total");
116}

◆ operator+=()

ArenaAllocatorBase::Stats & SG::ArenaAllocatorBase::Stats::operator+= ( const Stats & other)

Accumulate.

Accumulate a complete statistics block.

Parameters
otherThe statistics block to accumulate into this one.

Definition at line 86 of file ArenaAllocatorBase.cxx.

87{
88 elts += other.elts;
89 bytes += other.bytes;
90 blocks += other.blocks;
91 return *this;
92}

Member Data Documentation

◆ blocks

Stat SG::ArenaAllocatorBase::Stats::blocks

Counts of blocks.

Definition at line 218 of file ArenaAllocatorBase.h.

◆ bytes

Stat SG::ArenaAllocatorBase::Stats::bytes

Counts of bytes.

Definition at line 222 of file ArenaAllocatorBase.h.

◆ elts

Stat SG::ArenaAllocatorBase::Stats::elts

Counts of elements.

Definition at line 220 of file ArenaAllocatorBase.h.


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