mirror of
https://github.com/M66B/FairEmail.git
synced 2024-12-31 20:25:38 +00:00
Added statistics to debug info
This commit is contained in:
parent
9564ed0e9b
commit
fa8e8ee011
4 changed files with 17 additions and 5 deletions
|
@ -231,6 +231,9 @@ public interface DaoFolder {
|
|||
@Query("SELECT download FROM folder WHERE id = :id")
|
||||
boolean getFolderDownload(long id);
|
||||
|
||||
@Query("SELECT COUNT(*) FROM folder")
|
||||
int countTotal();
|
||||
|
||||
@Insert
|
||||
long insertFolder(EntityFolder folder);
|
||||
|
||||
|
|
|
@ -464,6 +464,9 @@ public interface DaoMessage {
|
|||
" AND sender = :sender")
|
||||
int countSender(long folder, String sender);
|
||||
|
||||
@Query("SELECT COUNT(*) FROM message")
|
||||
int countTotal();
|
||||
|
||||
@Query("SELECT message.*" +
|
||||
", account.pop AS accountProtocol, account.name AS accountName, account.category AS accountCategory, identity.color AS accountColor" +
|
||||
", account.notify AS accountNotify, account.leave_deleted AS accountLeaveDeleted, account.auto_seen AS accountAutoSeen" +
|
||||
|
|
|
@ -53,6 +53,9 @@ public interface DaoRule {
|
|||
" ORDER BY `order`, name COLLATE NOCASE")
|
||||
LiveData<List<TupleRuleEx>> liveRules(long folder);
|
||||
|
||||
@Query("SELECT COUNT(*) FROM rule")
|
||||
int countTotal();
|
||||
|
||||
@Insert
|
||||
long insertRule(EntityRule rule);
|
||||
|
||||
|
|
|
@ -2067,14 +2067,17 @@ public class Log {
|
|||
boolean auto_optimize = prefs.getBoolean("auto_optimize", false);
|
||||
boolean schedule = prefs.getBoolean("schedule", false);
|
||||
|
||||
size += write(os, "accounts=" + accounts.size() +
|
||||
" enabled=" + enabled +
|
||||
size += write(os, "enabled=" + enabled +
|
||||
" interval=" + pollInterval + "\r\n" +
|
||||
" metered=" + metered +
|
||||
"metered=" + metered +
|
||||
" VPN=" + ConnectionHelper.vpnActive(context) +
|
||||
" NetGuard=" + Helper.isInstalled(context, "eu.faircode.netguard") + "\r\n" +
|
||||
" optimizing=" + (ignoring == null ? null : !ignoring) +
|
||||
" auto_optimize=" + auto_optimize +
|
||||
"optimizing=" + (ignoring == null ? null : !ignoring) +
|
||||
" auto_optimize=" + auto_optimize + "\r\n" +
|
||||
"accounts=" + accounts.size() +
|
||||
" folders=" + db.folder().countTotal() +
|
||||
" messages=" + db.message().countTotal() +
|
||||
" rules=" + db.rule().countTotal() +
|
||||
"\r\n\r\n");
|
||||
|
||||
if (schedule) {
|
||||
|
|
Loading…
Reference in a new issue