From: Alex Rousskov Date: Sun, 16 Oct 2011 04:01:39 +0000 (-0600) Subject: Various fixes for Rock store unit tests. X-Git-Tag: BumpSslServerFirst.take01~93 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a46ed03b7115925c29960ce09dddbf22ed8c74cb;p=thirdparty%2Fsquid.git Various fixes for Rock store unit tests. Also some source maintenance updates. --- diff --git a/doc/debug-sections.txt b/doc/debug-sections.txt index 2af58f66bb..abeb48eebe 100644 --- a/doc/debug-sections.txt +++ b/doc/debug-sections.txt @@ -41,6 +41,7 @@ section 20 Storage Manager section 20 Storage Manager Heap-based replacement section 20 Storage Manager Logging Functions section 20 Storage Manager MD5 Cache Keys +section 20 Storage Manager Statistics section 20 Storage Manager Swapfile Metadata section 20 Storage Manager Swapfile Unpacker section 20 Storage Manager Swapin Functions diff --git a/src/Makefile.am b/src/Makefile.am index b3569e86e3..d05445bab9 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -2730,6 +2730,8 @@ tests_testRock_SOURCES = \ tests/stub_HttpRequest.cc \ tests/stub_icp.cc \ tests/stub_ipc.cc \ + tests/stub_ipcache.cc \ + tests/stub_libicmp.cc \ tests/stub_MemStore.cc \ tests/stub_mime.cc \ tests/stub_Port.cc \ diff --git a/src/StoreStats.cc b/src/StoreStats.cc index ccf3290d22..6541542b19 100644 --- a/src/StoreStats.cc +++ b/src/StoreStats.cc @@ -19,7 +19,7 @@ StoreInfoStats::StoreInfoStats() StoreInfoStats & StoreInfoStats::operator +=(const StoreInfoStats &stats) -{ +{ swap.size += stats.swap.size; swap.capacity += stats.swap.capacity; swap.count += stats.swap.count; diff --git a/src/StoreStats.h b/src/StoreStats.h index e9d05d8958..9be6f67a20 100644 --- a/src/StoreStats.h +++ b/src/StoreStats.h @@ -2,10 +2,12 @@ #define SQUID_STORE_STATS_H /// High-level store statistics used by mgr:info action. Used inside PODs! -class StoreInfoStats { +class StoreInfoStats +{ public: - /// Info common to memory and disk parts of the storage. Used inside PODs! - class Part { + /// Info common to memory and disk parts of the storage. Used inside PODs! + class Part + { public: double size; ///< bytes currently in use double count; ///< number of cached objects @@ -19,13 +21,15 @@ public: }; /// disk cache (all cache_dirs) storage stats - class Swap: public Part { + class Swap: public Part + { public: double open_disk_fd; ///< number of opened disk files }; /// memory cache (cache_mem) storage stats - class Mem: public Part { + class Mem: public Part + { public: bool shared; ///< whether memory cache is shared among workers }; @@ -45,7 +49,8 @@ public: // TODO: this should be adjusted for use in StoreIoActionData, DiskdActionData /// Store statistics related to low-level I/O. -class StoreIoStats { +class StoreIoStats +{ public: StoreIoStats(); diff --git a/src/fs/rock/RockSwapDir.cc b/src/fs/rock/RockSwapDir.cc index e062b1dc3e..910239f109 100644 --- a/src/fs/rock/RockSwapDir.cc +++ b/src/fs/rock/RockSwapDir.cc @@ -812,7 +812,7 @@ Rock::SwapDir::statfs(StoreEntry &e) const namespace Rock { - RunnerRegistrationEntry(rrAfterConfig, SwapDirRr); +RunnerRegistrationEntry(rrAfterConfig, SwapDirRr); } void Rock::SwapDirRr::create(const RunnerRegistry &)