mirror of
https://github.com/zulip/zulip.git
synced 2025-10-23 16:14:02 +00:00
Whenever we use API queries to mark messages as read we now increment two new LoggingCount stats, messages_read::hour and messages_read_interactions::hour. We add an early return in do_increment_logging_stat function if there are no changes (increment is 0), as an optimization to avoid unnecessary database queries. We also log messages_read_interactions::hour Logging stat as the number of API queries to mark messages as read. We don't include tests for the case where do_update_pointer is called because do_update_pointer will most likely be removed from the codebase in the near future.