Provide basic statistics about storage consumption and traffic

Beside the existing feature proposal from 2018 which doesn’t fully fit my intention I’m doing this new request/proposal now.

Expected behavior

  1. Provide some basic statistic data about internal data storage consumption, like:
  • per chat:
    • number of messages
    • number of blob files
    • total storage consumption (maybe splitted for messages and blobs)
  • total number of chats
  • top 10 of biggest chats
  1. Traffic
  • for example for last week or last month
    • number of messages sent/received
    • bytes sent/received
    • average of message size sent/received (total size from/to servers, not text body or attachments)

This information could be provided in a simple text file like current view of logfile.

Actual behavior

In header of log view there are existing right now some of these informations.

For reference the old feature proposal:
Show message size and other statistics

1 Like

What do you want to use this statistics for?

I have thought about providing some counters since application start (messages transmitted/received, bytes transmitted/received via SMTP and IMAP connections), mostly to avoid significant regressions in automatic tests. Saving the stats will require designing SQL table for this etc., do you think it’s worth the effort when OS usually provides this statistics anyway?

1 Like

This is a good question!

At first, we don’t need that for basic operation of DC, but when you’ll ask me about these values … I have no idea about most of these data.
What I have:
My device provides statistics about bytes send/received in a specific time range for a certain app. But that’s all.

I came to this proposal by thinking about the question of exporting a chat, delete a part of a chat and some some general considerations around data handling.

Some questions of interest (for me) are:

  • What is the biggest chat and how is the storage consumption (messages: number, bytes in summary / blobs: number, bytes in summary)?
  • Top 10 of that
  • How much storage we need for messages (db size is existing in log header yet) and blobs in summary?
  • Top x biggest messages (size - big messages slow down full text search significantly)
  • number of bytes transfered sent/received (real message transfer / over all)

These statistics would give every user the possibility:

  • to see real storage consumption and where it is
  • data for DC optimization when strange behaviour would happen
  • data for housekeeping decisions

For certain calculations there is the config table in db where necessary values can be stored. I know, the name for that table is not so good for this purpose, but from technical point of view it is usable.

For myself I started generating some statistic data in logging the real message size of outgoing messages. I wanted to know, how big is the smallest possible message, a standard message, a message with attachment.

Yes: that’s it in a first glance :wink: