Closed zieren closed 2 years ago
This is now configurable. But the server still implicitly uses 15s by specifying e.g. 20s in queries for continuous use. The server should instead compute the range from the config value, using the same default as the client.
It would be nice to reduce the number of records written to the database. E.g. given that most records are identical to the previous one (except for the timestamp), we could update the previous line with the new timestamp and somehow indicate that the resulting gap, which may be as largre as this condition holds, is not due to a shutdown/logoff. Ideas for that:
Storing time ranges instead of individual samples increases complexity of all queries, but would likely improve performance and reduce storage.
As storage is not a problem, an alternative might be to cache the common "how much time was spent" query. We should first check the actual query cost in the logs, as there may be other expensive queries.
This is fixed by the schema change.
The 15 second sample interval is currently hardcoded in the client and, even worse, implicitly hardcoded on the server.