2 * Copyright (C) 1996-2016 The Squid Software Foundation and contributors
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.
10 #include "sbuf/DetailedStats.h"
14 * Implementation note: the purpose of this construct is to avoid adding
15 * external dependencies to the SBuf code
18 static StatHist sbufDestructTimeStats
;
19 static StatHist memblobDestructTimeStats
;
21 namespace SBufDetailedStatsHistInitializer
23 // run the post-instantiation initialization methods for StatHist objects
26 sbufDestructTimeStats
.logInit(100,30.0,128000.0);
27 memblobDestructTimeStats
.logInit(100,30.0,128000.0);
30 Initializer initializer
;
34 recordSBufSizeAtDestruct(SBuf::size_type sz
)
36 sbufDestructTimeStats
.count(static_cast<double>(sz
));
40 collectSBufDestructTimeStats()
42 return &sbufDestructTimeStats
;
46 recordMemBlobSizeAtDestruct(SBuf::size_type sz
)
48 memblobDestructTimeStats
.count(static_cast<double>(sz
));
52 collectMemBlobDestructTimeStats()
54 return &memblobDestructTimeStats
;