mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-10-30 10:47:22 +08:00
removed unnecessary logs
This commit is contained in:
parent
3acf11b111
commit
f339ac70a1
1 changed files with 0 additions and 23 deletions
|
|
@ -986,29 +986,6 @@ function showResult(difficultyFailed = false) {
|
|||
});
|
||||
}
|
||||
|
||||
function stdDev(array) {
|
||||
const n = array.length;
|
||||
const mean = array.reduce((a, b) => a + b) / n;
|
||||
return Math.sqrt(
|
||||
array.map((x) => Math.pow(x - mean, 2)).reduce((a, b) => a + b) / n
|
||||
);
|
||||
}
|
||||
|
||||
console.log(
|
||||
`avg time between keys ${
|
||||
keypressStats.spacing.array.reduce(
|
||||
(previous, current) => (current += previous)
|
||||
) / keypressStats.spacing.array.length
|
||||
} std(${stdDev(keypressStats.spacing.array)})`
|
||||
);
|
||||
console.log(
|
||||
`avg key down time ${
|
||||
keypressStats.duration.array.reduce(
|
||||
(previous, current) => (current += previous)
|
||||
) / keypressStats.duration.array.length
|
||||
} std(${stdDev(keypressStats.duration.array)})`
|
||||
);
|
||||
|
||||
wpmOverTimeChart.data.datasets[2].data = errorsNoZero;
|
||||
|
||||
if (difficultyFailed) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue