/*
- * Copyright (C) 1996-2015 The Squid Software Foundation and contributors
+ * Copyright (C) 1996-2018 The Squid Software Foundation and contributors
*
* Squid software is distributed under GPLv2+ license and includes
* contributions from numerous individuals and organizations.
*/
#include "squid.h"
+#include "base/PackableStream.h"
#include "ipc/Messages.h"
#include "ipc/TypedMsgHdr.h"
#include "mgr/Registration.h"
-#include "SBufDetailedStats.h"
+#include "sbuf/DetailedStats.h"
#include "SBufStatsAction.h"
-#include "StoreEntryStream.h"
SBufStatsAction::SBufStatsAction(const Mgr::CommandPointer &cmd_):
Action(cmd_)
{
sbdata = SBuf::GetStats();
mbdata = MemBlob::GetStats();
- sbsizesatdestruct = *collectSBufDestructTimeStats();
- mbsizesatdestruct = *collectMemBlobDestructTimeStats();
+ sbsizesatdestruct = collectSBufDestructTimeStats();
+ mbsizesatdestruct = collectMemBlobDestructTimeStats();
}
static void
void
SBufStatsAction::dump(StoreEntry* entry)
{
- StoreEntryStream ses(entry);
+ PackableStream ses(*entry);
ses << "\n\n\nThese statistics are experimental; their format and contents "
"should not be relied upon, they are bound to change as "
"the SBuf feature is evolved\n";
msg.getPod(mbdata);
}
-static const bool Registered = (Mgr::RegisterAction("sbuf",
- "String-Buffer statistics", &SBufStatsAction::Create, 0 , 1),
- true);
+void
+SBufStatsAction::RegisterWithCacheManager()
+{
+ Mgr::RegisterAction("sbuf", "String-Buffer statistics", &SBufStatsAction::Create, 0, 1);
+}