Brainstorming/HostFerret/SQL/hf checkins

From Woozle Writes Code
< Brainstorming‎ | HostFerret‎ | SQL
Revision as of 17:56, 7 July 2017 by Woozle (talk | contribs) (Created page with "==About== '''Purpose''': Rather than log each and every single checkin, we'll just keep statistics about stretches of checkins that fall within expected time-limits. That is,...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

About

Purpose: Rather than log each and every single checkin, we'll just keep statistics about stretches of checkins that fall within expected time-limits. That is, as long as a checkin isn't too late, we'll just treat it as

SQL

<mysql>CREATE TABLE `hf_checkins` (

 `ID`                   INT NOT NULL AUTO_INCREMENT,
 `WhenStart`       DATETIME NOT NULL COMMENT "when the stretch started",
 `ID_Session`           INT NOT NULL COMMENT "session.ID of checkin connection",
 `Stats_Count`          INT NOT NULL COMMENT "number of checkins in this stretch",
 `Stats_DiffSum`        INT NOT NULL COMMENT "SUM(X) where X is interval since previous checkin",
 `Stats_DiffSSq`        INT NOT NULL COMMENT "SUM(X^2)",
  PRIMARY KEY(`ID`)

) ENGINE = InnoDB;</mysql>