5 #ifndef CVMFS_SWISSKNIFE_FILESTATS_H_
6 #define CVMFS_SWISSKNIFE_FILESTATS_H_
20 namespace swissknife {
26 bool CreateEmptyDatabase();
30 int64_t StoreCatalog(int64_t num_entries, int64_t file_size);
31 int64_t StoreFile(int64_t catalog_id, int64_t object_id);
32 int64_t StoreObject(
const void *hash,
int hash_size, int64_t
size);
33 int64_t StoreChunkedFile(int64_t catalog_id);
34 int64_t StoreChunk(
const void *hash,
int hash_size, int64_t size,
36 int64_t StoreSymlink(int64_t length);
37 void InitStatements();
38 void DestroyStatements();
60 virtual std::string
GetName()
const {
return "filestats"; }
62 return "CernVM File System repository statistics exporter.";
76 template <
class ObjectFetcherT>
77 bool Run(ObjectFetcherT *object_fetcher);
81 static void *MainProcessing(
void *data);
83 void ProcessCatalog(
string db_path);
88 #endif // CVMFS_SWISSKNIFE_FILESTATS_H_
static float kLatestSchema
const std::string & filename() const
std::vector< Parameter > ParameterList
sqlite::Sql * query_insert_file
Database(const std::string &filename, const OpenMode open_mode)
atomic_int32 num_downloaded_
virtual std::string GetDescription() const
pthread_t thread_processing_
virtual std::string GetName() const
FileStatsDatabase(const std::string &filename, const OpenMode open_mode)
static unsigned kLatestSchemaRevision
sqlite::Sql * query_lookup_object
sqlite::Sql * query_insert_catalog
std::map< char, SharedPtr< std::string > > ArgumentList
sqlite::Sql * query_insert_symlink
sqlite::Sql * query_insert_file_object
sqlite::Sql * query_insert_object