summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Mollekopf <chrigi_1@fastmail.fm>2018-01-25 11:21:19 +0100
committerChristian Mollekopf <chrigi_1@fastmail.fm>2018-01-25 11:21:19 +0100
commitbe5db195f2e3aa15317d4c68edcc3adb605791c8 (patch)
treec19c7b91ca7be0d909cfde076c7f24ba90e6eb6d
parent50df30dfea10a3c1ee6fe8de9856fdb4596a08fe (diff)
downloadsink-be5db195f2e3aa15317d4c68edcc3adb605791c8.tar.gz
sink-be5db195f2e3aa15317d4c68edcc3adb605791c8.zip
Get blob size as part of stat
-rw-r--r--sinksh/syntax_modules/sink_stat.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/sinksh/syntax_modules/sink_stat.cpp b/sinksh/syntax_modules/sink_stat.cpp
index 3238f4c..a48ffad 100644
--- a/sinksh/syntax_modules/sink_stat.cpp
+++ b/sinksh/syntax_modules/sink_stat.cpp
@@ -61,6 +61,14 @@ void statResources(const QStringList &resources, const State &state)
61 } 61 }
62 auto size = diskUsage / 1024; 62 auto size = diskUsage / 1024;
63 state.printLine(QObject::tr("Actual database file sizes [kb]: %1").arg(size), 1); 63 state.printLine(QObject::tr("Actual database file sizes [kb]: %1").arg(size), 1);
64
65 QDir dataDir{Sink::resourceStorageLocation(resource.toLatin1()) + "/blob/"};
66 Q_ASSERT(dataDir.exists());
67 qint64 dataSize = 0;
68 for (const auto &e : dataDir.entryInfoList(QDir::Files | QDir::NoSymLinks | QDir::NoDotAndDotDot)) {
69 dataSize += e.size();
70 }
71 state.printLine(QObject::tr("Total BLOB size [kb]: %1").arg(dataSize / 1024), 1);
64 } 72 }
65 73
66} 74}