mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-03-12 06:33:22 +08:00
added key consistency to the key popup
This commit is contained in:
parent
25684b8f40
commit
0c3f9fc8dd
1 changed files with 6 additions and 1 deletions
|
@ -1449,6 +1449,11 @@ function showResult(difficultyFailed = false) {
|
|||
}
|
||||
|
||||
let consistency = roundTo2(kogasa(stddev / avg));
|
||||
let keyConsistency = roundTo2(
|
||||
kogasa(
|
||||
stdDev(keypressStats.spacing.array) / mean(keypressStats.spacing.array)
|
||||
)
|
||||
);
|
||||
|
||||
if (isNaN(consistency)) {
|
||||
consistency = 0;
|
||||
|
@ -1457,7 +1462,7 @@ function showResult(difficultyFailed = false) {
|
|||
$("#result .stats .consistency .bottom").text(Math.round(consistency) + "%");
|
||||
$("#result .stats .consistency .bottom").attr(
|
||||
"aria-label",
|
||||
consistency + "%"
|
||||
`${consistency}% (${keyConsistency}% key)`
|
||||
);
|
||||
|
||||
wpmOverTimeChart.data.datasets[0].borderColor = themeColors.main;
|
||||
|
|
Loading…
Reference in a new issue