0b489ab0ae3bf0026d68865777f0800019edf436
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.
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.
Languages
C
61.9%
Python
36.7%
Makefile
0.9%
Shell
0.5%