summaryrefslogtreecommitdiffstats
path: root/examples/client/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'examples/client/main.cpp')
-rw-r--r--examples/client/main.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/examples/client/main.cpp b/examples/client/main.cpp
index 946557f..ad65e44 100644
--- a/examples/client/main.cpp
+++ b/examples/client/main.cpp
@@ -21,6 +21,7 @@
21#include <QCommandLineParser> 21#include <QCommandLineParser>
22#include <QCommandLineOption> 22#include <QCommandLineOption>
23#include <QElapsedTimer> 23#include <QElapsedTimer>
24#include <QDir>
24 25
25#include "common/clientapi.h" 26#include "common/clientapi.h"
26#include "common/resource.h" 27#include "common/resource.h"
@@ -407,6 +408,12 @@ int main(int argc, char *argv[])
407 total += size; 408 total += size;
408 } 409 }
409 std::cout << "Total [kb]: " << total / 1024 << std::endl; 410 std::cout << "Total [kb]: " << total / 1024 << std::endl;
411 int diskUsage = 0;
412 QDir dir(Akonadi2::storageLocation());
413 for (const auto &folder : dir.entryList(QStringList() << resource + "*")) {
414 diskUsage += Akonadi2::Storage(Akonadi2::storageLocation(), folder, Akonadi2::Storage::ReadOnly).diskUsage();
415 }
416 std::cout << "Disk usage [kb]: " << diskUsage / 1024 << std::endl;
410 } 417 }
411 } else { 418 } else {
412 qWarning() << "Unknown command " << command; 419 qWarning() << "Unknown command " << command;