#include <statistics_database.h>
|
bool | CreateEmptyDatabase () |
|
bool | CheckSchemaCompatibility () |
|
bool | LiveSchemaUpgradeIfNecessary () |
|
bool | CompactDatabase () const |
|
| ~StatisticsDatabase () |
|
bool | StorePublishStatistics (const perf::Statistics *statistics, const std::string &start_time, const bool success) |
|
bool | StoreGCStatistics (const perf::Statistics *statistics, const std::string &start_time, const bool success) |
|
bool | UploadStatistics (upload::Spooler *spooler, std::string local_path="") |
|
bool | UploadStatistics (upload::AbstractUploader *uploader, std::string local_path="") |
|
bool | IsEqualSchema (const float value, const float compare) const |
|
bool | BeginTransaction () const |
|
bool | CommitTransaction () const |
|
T | GetProperty (const std::string &key) const |
|
T | GetPropertyDefault (const std::string &key, const T default_value) const |
|
bool | SetProperty (const std::string &key, const T value) |
|
bool | HasProperty (const std::string &key) const |
|
sqlite3 * | sqlite_db () const |
|
const std::string & | filename () const |
|
float | schema_version () const |
|
unsigned | schema_revision () const |
|
bool | read_write () const |
|
unsigned | GetModifiedRowCount () const |
|
double | GetFreePageRatio () const |
|
void | GetMemStatistics (MemStatistics *stats) const |
|
bool | Vacuum () const |
|
void | PrintSqlError (const std::string &error_msg) |
|
std::string | GetLastErrorMsg () const |
|
void | TakeFileOwnership () |
|
void | DropFileOwnership () |
|
bool | OwnsFile () const |
|
void | EnforceSchema (float version, unsigned revision) |
|
Definition at line 20 of file statistics_database.h.
StatisticsDatabase::StatisticsDatabase |
( |
const std::string & |
filename, |
|
|
const OpenMode |
open_mode |
|
) |
| |
|
protected |
StatisticsDatabase::~StatisticsDatabase |
( |
| ) |
|
bool StatisticsDatabase::CheckSchemaCompatibility |
( |
| ) |
|
bool StatisticsDatabase::CompactDatabase |
( |
| ) |
const |
bool StatisticsDatabase::CreateEmptyDatabase |
( |
| ) |
|
bool StatisticsDatabase::GcExtendedStats |
( |
const std::string & |
repo_name | ) |
|
|
static |
void StatisticsDatabase::GetDBParams |
( |
const std::string & |
repo_name, |
|
|
std::string * |
path, |
|
|
uint32_t * |
days_to_keep |
|
) |
| |
|
static |
Get the parameters for the database file user can specify them in the server.conf DB file path: key: CVMFS_STATISTICS_DB default: /var/spool/cvmfs/$repo_name/stats.db maximum age (in days) of records to keep when pruning (zero means keep forever) key: CVMFS_STATS_DB_DAYS_TO_KEEP default: 365
- Parameters
-
repo_name | Fully qualified name of the repository |
path | pointer to save the db path in |
days_to_keep | pointer to save the number of days |
Definition at line 564 of file statistics_database.cc.
Referenced by OpenStandardDB().
bool StatisticsDatabase::LiveSchemaUpgradeIfNecessary |
( |
| ) |
|
bool StatisticsDatabase::Prune |
( |
uint32_t |
days | ) |
|
|
protected |
Prune the statistics DB (delete records older than certain threshold)
- Parameters
-
days | number of days of records to keep, 0 means no pruning |
- Returns
- true on success, false otherwise
Definition at line 487 of file statistics_database.cc.
Referenced by OpenStandardDB().
bool StatisticsDatabase::StoreEntry |
( |
const std::string & |
insert_statement | ) |
|
|
protected |
bool StatisticsDatabase::StoreGCStatistics |
( |
const perf::Statistics * |
statistics, |
|
|
const std::string & |
start_time, |
|
|
const bool |
success |
|
) |
| |
bool StatisticsDatabase::StorePublishStatistics |
( |
const perf::Statistics * |
statistics, |
|
|
const std::string & |
start_time, |
|
|
const bool |
success |
|
) |
| |
bool StatisticsDatabase::UploadStatistics |
( |
upload::Spooler * |
spooler, |
|
|
std::string |
local_path = "" |
|
) |
| |
Upload the statistics database into the storage backend configured in uploader.
- Returns
- true on success, false otherwise
Definition at line 544 of file statistics_database.cc.
unsigned int StatisticsDatabase::check_compatibility_calls |
unsigned int StatisticsDatabase::compact_calls |
|
mutable |
bool StatisticsDatabase::compacting_fails = false |
|
static |
unsigned int StatisticsDatabase::create_empty_db_calls |
unsigned int StatisticsDatabase::instances = 0 |
|
static |
const uint32_t StatisticsDatabase::kDefaultDaysToKeep = 365 |
|
staticprivate |
const float StatisticsDatabase::kLatestCompatibleSchema = 1.0f |
|
static |
float StatisticsDatabase::kLatestSchema = 1.0f |
|
static |
unsigned StatisticsDatabase::kLatestSchemaRevision = 4 |
|
static |
unsigned int StatisticsDatabase::live_upgrade_calls |
std::string StatisticsDatabase::repo_name_ |
|
protected |
The documentation for this class was generated from the following files: