mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-02-05 05:17:51 +08:00
fixed tests being not saved beacuse of 'not making sense' (test duration wasnt lining up with keyspacing)
This commit is contained in:
parent
374b1a19b0
commit
6d1ca8d285
1 changed files with 10 additions and 3 deletions
|
@ -1100,7 +1100,7 @@ export async function finish(difficultyFailed = false) {
|
|||
Replay.replayGetWordsList(input.history);
|
||||
}
|
||||
|
||||
// TestStats.recordKeypressSpacing();
|
||||
TestStats.recordKeypressSpacing(); //this is needed in case there is afk time at the end - to make sure test duration makes sense
|
||||
|
||||
TestUI.setResultCalculating(true);
|
||||
TestUI.setResultVisible(true);
|
||||
|
@ -1332,10 +1332,17 @@ export async function finish(difficultyFailed = false) {
|
|||
let avg = Misc.mean(rawWpmPerSecondRaw);
|
||||
|
||||
let consistency = Misc.roundTo2(Misc.kogasa(stddev / avg));
|
||||
|
||||
let keyconsistencyarray = TestStats.keypressTimings.spacing.array.slice();
|
||||
|
||||
keyconsistencyarray = keyconsistencyarray.splice(
|
||||
0,
|
||||
keyconsistencyarray.length - 1
|
||||
);
|
||||
|
||||
let keyConsistency = Misc.roundTo2(
|
||||
Misc.kogasa(
|
||||
Misc.stdDev(TestStats.keypressTimings.spacing.array) /
|
||||
Misc.mean(TestStats.keypressTimings.spacing.array)
|
||||
Misc.stdDev(keyconsistencyarray) / Misc.mean(keyconsistencyarray)
|
||||
)
|
||||
);
|
||||
|
||||
|
|
Loading…
Reference in a new issue