Debian Codegraph @

src/wormhole_transit_relay/db-schemas/v1.sql

raw
1
2 CREATE TABLE `version` -- contains one row
3 (
4 `version` INTEGER -- set to 1
5 );
6
7
8 CREATE TABLE `current` -- contains one row
9 (
10 `rebooted` INTEGER, -- seconds since epoch of most recent reboot
11 `updated` INTEGER, -- when `current` was last updated
12 `connected` INTEGER, -- number of current paired connections
13 `waiting` INTEGER, -- number of not-yet-paired connections
14 `incomplete_bytes` INTEGER -- bytes sent through not-yet-complete connections
15 );
16
17 CREATE TABLE `usage`
18 (
19 `started` INTEGER, -- seconds since epoch, rounded to "blur time"
20 `total_time` INTEGER, -- seconds from open to last close
21 `waiting_time` INTEGER, -- seconds from start to 2nd side appearing, or None
22 `total_bytes` INTEGER, -- total bytes relayed (both directions)
23 `result` VARCHAR -- happy, scary, lonely, errory, pruney
24 -- transit moods:
25 -- "errory": one side gave the wrong handshake
26 -- "lonely": good handshake, but the other side never showed up
27 -- "redundant": good handshake, abandoned in favor of different connection
28 -- "happy": both sides gave correct handshake
29 );
30 CREATE INDEX `usage_started_index` ON `usage` (`started`);
31 CREATE INDEX `usage_result_index` ON `usage` (`result`);