From 2df41462ad67f90265f52ebd38e47506ab9bad8c Mon Sep 17 00:00:00 2001 From: Michael Zanetti Date: Mon, 6 Dec 2021 12:24:34 +0100 Subject: [PATCH] Update size estimation comments based on new log entry format --- plugin/energylogger.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/plugin/energylogger.cpp b/plugin/energylogger.cpp index d8d18e7..9f1193c 100644 --- a/plugin/energylogger.cpp +++ b/plugin/energylogger.cpp @@ -25,11 +25,12 @@ EnergyLogger::EnergyLogger(QObject *parent) : EnergyLogs(parent) // of all series building on it. // Disk space considerations; - // Each entry takes approx 30 bytes for powerBalance + 50 bytes for thingCurrentPower per thing of disk space + // Each entry takes approx 50 bytes for powerBalance + 60 bytes for thingCurrentPower per thing of disk space // SQLite adds metadata and overhead of about 5% // The resulting database size can be estimated with (count being the sum of all numbers below): - // (count * 30 bytes) + (count * things * 50 bytes) + 5% - // 10000 entries, with 5 energy things => ~3MB + // (count * 50 bytes) + (count * things * 60 bytes) + 5% + // 10000 entries, with 5 energy things => ~4MB + // Note: use sqlite3_analyzer to see the approx. size per entry in each table. m_maxMinuteSamples = 15;