GCC Code Coverage Report


Directory: cvmfs/
File: cvmfs/swissknife_rotate_statsdb.h
Date: 2026-03-22 02:40:38
Exec Total Coverage
Lines: 0 4 0.0%
Branches: 0 0 -%

Line Branch Exec Source
1 /**
2 * This file is part of the CernVM File System.
3 */
4
5 #ifndef CVMFS_SWISSKNIFE_ROTATE_STATSDB_H_
6 #define CVMFS_SWISSKNIFE_ROTATE_STATSDB_H_
7
8 #include <string>
9
10 #include "swissknife.h"
11
12 namespace swissknife {
13
14 /**
15 * Rotates the statistics database for a CernVM-FS repository.
16 * Archives the current stats.db via VACUUM INTO, then clears it.
17 * Uses the vendored SQLite to avoid depending on the system sqlite3 binary.
18 */
19 class CommandRotateStatsDB : public Command {
20 public:
21 ~CommandRotateStatsDB() { }
22 virtual std::string GetName() const { return "rotate-statsdb"; }
23 virtual std::string GetDescription() const {
24 return "Rotate (archive and clear) a CernVM-FS repository statistics "
25 "database.\n"
26 "Archives the database via VACUUM INTO and then deletes all rows "
27 "from publish_statistics and gc_statistics tables.";
28 }
29 virtual ParameterList GetParams() const;
30 int Main(const ArgumentList &args);
31 };
32
33 } // namespace swissknife
34
35 #endif // CVMFS_SWISSKNIFE_ROTATE_STATSDB_H_
36