Documentation
¶
Index ¶
- Variables
- func CloseDB()
- func GetDBFilePath() (string, error)
- func GetFileOffset(filePath string) int
- func GetKeyMetrics() map[rune]KeyMetric
- func GetPBRace(modeKey string) (float64, []float64)
- func GetTopSlowestBigrams(limit int) []string
- func GetTopWeakKeys(limit int) []rune
- func InitDB() error
- func RecordBigramHit(bigram string, latencyMs int64) error
- func RecordKeyHit(keyChar string, isError bool, latencyMs int64) error
- func SaveFileOffset(filePath string, offset int) error
- func SavePBRace(modeKey string, wpm float64, samples []float64) error
- func SaveTestRun(mode string, wpm, rawWPM, accuracy, consistency float64, durationSec int) error
- type KeyMetric
Constants ¶
This section is empty.
Variables ¶
View Source
var DB *sql.DB
Functions ¶
func GetDBFilePath ¶
GetDBFilePath returns path to ~/.config/jeeratype/stats.db with permission fallback.
func GetFileOffset ¶ added in v1.0.2
GetFileOffset retrieves saved reading offset for a file.
func GetKeyMetrics ¶
GetKeyMetrics returns map of key stats for ASCII Keyboard Heatmap rendering.
func GetTopSlowestBigrams ¶
GetTopSlowestBigrams returns top slowest key transition pairs.
func GetTopWeakKeys ¶
GetTopWeakKeys returns the most missed or slowest keys.
func RecordBigramHit ¶
RecordBigramHit updates count and latency for a key-to-key transition.
func RecordKeyHit ¶
RecordKeyHit updates hits, errors, and latency for a single key.
func SaveFileOffset ¶ added in v1.0.2
SaveFileOffset records or updates file reading cursor offset.
func SavePBRace ¶ added in v1.0.2
SavePBRace records personal best WPM and 1-second sample timeline.
Types ¶
Click to show internal directories.
Click to hide internal directories.