mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2026-11-15 00:07:13 +00:00
feat(db): measure the database's size per table and keep the samples
IDatabaseUsage: MySQL/MariaDB from information_schema.TABLES (fresh statistics on MySQL 8), SQLite from its page counts and the dbstat table (now compiled in) with counted rows. Samples go to database_usage and database_usage_tables (migrations 105 / 88). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -220,6 +220,12 @@ public:
|
||||
void InsertTrafficMinutes(const std::vector<TrafficMinute>& minutes) override;
|
||||
std::vector<TrafficMinute> GetTrafficMinutes(int64_t from, int64_t to, int64_t bucketSeconds) override;
|
||||
uint32_t PruneTrafficMinutes(int64_t beforeTime) override;
|
||||
// IDatabaseUsage
|
||||
Measurement MeasureDatabaseUsage() override;
|
||||
void InsertDatabaseUsage(const UsageTotals& totals, const std::vector<TableUsage>& tables) override;
|
||||
std::vector<UsageTotals> GetDatabaseUsageTotals(int64_t from, int64_t to) override;
|
||||
std::vector<TableUsage> GetDatabaseUsageTables(int64_t time) override;
|
||||
uint32_t PruneDatabaseUsage(int64_t beforeTime) override;
|
||||
|
||||
// IUgcLookup
|
||||
std::vector<UgcEntry> SearchUgc(const UgcSearch& search, const uint32_t limit) override;
|
||||
|
||||
Reference in New Issue
Block a user