retoor 0b489ab0ae feat: add session statistics tracking with duration and completion rate metrics
Implement a new session statistics module that records session duration, completion rates, and user engagement metrics. The module includes a data collection service that aggregates session data from active user sessions, a storage layer for persisting statistics to the database, and a REST API endpoint for querying aggregated statistics. Key additions include a SessionStats model with fields for session_id, user_id, start_time, end_time, duration_seconds, and completion_status, along with a StatsService class that provides methods for recording session events and computing summary statistics. The implementation also adds database migration scripts for creating the session_stats table and updates the session management code to emit events to the statistics service on session start and end.
2024-12-08 18:47:44 +00:00

Tikker

Tikker is Dutch for typer.

This is an application for monitoring your key presses.

It will store all your keypresses in a database called 'tikker.db' in current work directory.

Usage

Execute as root is important!

sudo ./tikker

It can be annoying to have the terminal open the whole day. I advise to use tmux or install it as systemd service. If you install it as systemd service, you're sure you'll never miss a key press! Make sure that you define the work directory where the database should be stored in systemd service.

Compilation

Compilation requires sqlite3 development header files.

sudo apt install libsqlite3-dev

Building:

make build

Building and running:

make

Output explained

Keyboard: AT Translated Set 2 keyboard, Event: RELEASED, Key Code: 15 Pr: 24 Rel: 25 Rep: 14

Description is quite clear I assume in exception of last three. These are explained below:

  • Pr = key presses this session (so not the total in database).
  • Rel = key releases this session (so not the total in database). Release is one more than presses due startup of application that only registers the release of a key.
  • Rep = when you hold you key down thus repeats. Also for only session, not database totals.
S
Description
Application to monitor your key presses
Readme
3.1 MiB
Languages
C 61.9%
Python 36.7%
Makefile 0.9%
Shell 0.5%