Stats.cc
Go to the documentation of this file.
1/*
2 * Copyright (C) 1996-2023 The Squid Software Foundation and contributors
3 *
4 * Squid software is distributed under GPLv2+ license and includes
5 * contributions from numerous individuals and organizations.
6 * Please see the COPYING and CONTRIBUTORS files for details.
7 */
8
9#include "squid.h"
10#include "mem/Allocator.h"
11#include "mem/Pool.h"
12#include "mem/Stats.h"
13
14size_t
16{
18
19 stats.meter = &TheMeter;
20 stats.label = "Total";
21 stats.obj_size = 1;
22 stats.overhead += sizeof(MemPools);
23
24 /* gather all stats for Totals */
25 size_t pools_inuse = 0;
26 for (const auto pool: MemPools::GetInstance().pools) {
27 if (pool->getStats(stats) > 0)
28 ++pools_inuse;
29 stats.overhead += sizeof(Allocator *);
30 }
31
32 return pools_inuse;
33}
Mem::PoolMeter TheMeter
memory usage totals as of latest MemPools::flushMeters() event
Definition: Pool.cc:24
Definition: Pool.h:61
std::list< Mem::Allocator * > pools
Definition: Pool.h:112
void flushMeters()
Definition: Pool.cc:72
static MemPools & GetInstance()
Definition: Pool.cc:27
size_t GlobalStats(PoolStats &)
Definition: Stats.cc:15
class Ping::pingStats_ stats

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors