mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-11-10 14:10:59 +08:00
Merge branch 'master' into newads
This commit is contained in:
commit
bee7308992
5 changed files with 120 additions and 75 deletions
|
|
@ -834,6 +834,7 @@ $(document).keydown(async (event) => {
|
|||
}
|
||||
TestInput.recordKeypressSpacing();
|
||||
TestInput.setKeypressDuration(performance.now());
|
||||
TestInput.recordKeydownTime(event.code);
|
||||
TestInput.setKeypressNotAfk();
|
||||
|
||||
//blocking firefox from going back in history with backspace
|
||||
|
|
@ -963,6 +964,7 @@ $("#wordsInput").keyup((event) => {
|
|||
);
|
||||
TestInput.pushKeypressDuration(diff);
|
||||
}
|
||||
TestInput.recordKeyupTime(event.code);
|
||||
TestInput.setKeypressDuration(now);
|
||||
Monkey.stop();
|
||||
});
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import * as TestWords from "./test-words";
|
||||
import { roundTo2 } from "../utils/misc";
|
||||
import { roundTo2, stdDev, mean } from "../utils/misc";
|
||||
|
||||
interface Keypress {
|
||||
count: number;
|
||||
|
|
@ -227,7 +227,14 @@ export function setKeypressTimingsTooLong(): void {
|
|||
keypressTimings.duration.array = "toolong";
|
||||
}
|
||||
|
||||
const keysObj: Record<string, number> = {};
|
||||
|
||||
let t1 = 0;
|
||||
let d1 = 0;
|
||||
|
||||
export function pushKeypressDuration(val: number): void {
|
||||
t1 += val;
|
||||
d1++;
|
||||
(keypressTimings.duration.array as number[]).push(roundTo2(val));
|
||||
}
|
||||
|
||||
|
|
@ -235,6 +242,37 @@ export function setKeypressDuration(val: number): void {
|
|||
keypressTimings.duration.current = roundTo2(val);
|
||||
}
|
||||
|
||||
let t2 = 0;
|
||||
let d2 = 0;
|
||||
const a: number[] = [];
|
||||
|
||||
export function recordKeyupTime(key: string): void {
|
||||
const now = performance.now();
|
||||
const diff = Math.abs(keysObj[key] - now);
|
||||
|
||||
t2 += diff;
|
||||
d2++;
|
||||
a.push(roundTo2(diff));
|
||||
}
|
||||
|
||||
export function recordKeydownTime(key: string): void {
|
||||
keysObj[key] = performance.now();
|
||||
}
|
||||
|
||||
export function logOldAndNew(): void {
|
||||
if (!spacingDebug) return;
|
||||
console.log(
|
||||
"old",
|
||||
t1,
|
||||
d1,
|
||||
t1 / d1,
|
||||
keypressTimings.duration.array,
|
||||
stdDev(keypressTimings.duration.array as number[]),
|
||||
mean(keypressTimings.duration.array as number[])
|
||||
);
|
||||
console.log("new", t2, d2, t2 / d2, a, stdDev(a), mean(a));
|
||||
}
|
||||
|
||||
function pushKeypressSpacing(val: number): void {
|
||||
(keypressTimings.spacing.array as number[]).push(roundTo2(val));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1390,6 +1390,8 @@ function buildCompletedEvent(difficultyFailed: boolean): CompletedEvent {
|
|||
afkDuration: undefined,
|
||||
};
|
||||
|
||||
TestInput.logOldAndNew();
|
||||
|
||||
// stats
|
||||
const stats = TestStats.calculateStats();
|
||||
if (stats.time % 1 != 0 && Config.mode !== "time") {
|
||||
|
|
|
|||
|
|
@ -4,8 +4,8 @@
|
|||
"lukew3",
|
||||
"typerqeo",
|
||||
"Ferotiq",
|
||||
"bhomie",
|
||||
"rizwanmustafa",
|
||||
"bhomie",
|
||||
"Estebene",
|
||||
"SeerLite",
|
||||
"willerbee",
|
||||
|
|
@ -19,9 +19,9 @@
|
|||
"DharmarajX24",
|
||||
"a1usha",
|
||||
"0x8b",
|
||||
"Saint-dev",
|
||||
"jnoel-dev",
|
||||
"teddinotteddy",
|
||||
"dependabot[bot]",
|
||||
"seaerchin",
|
||||
"ryan-harrington",
|
||||
"Smithster",
|
||||
"Marco-Pagani",
|
||||
|
|
@ -32,21 +32,24 @@
|
|||
"refact0r",
|
||||
"Erlkoenigs",
|
||||
"Killer8Hyper",
|
||||
"rustom",
|
||||
"albertying",
|
||||
"neezacoto",
|
||||
"MustafaLinux",
|
||||
"omackenzie",
|
||||
"rustom",
|
||||
"xZa-k",
|
||||
"holyhearted",
|
||||
"avi123nash",
|
||||
"bataak",
|
||||
"jameslounds",
|
||||
"ThatOneCalculator",
|
||||
"mwahlig",
|
||||
"kemonprogrammer",
|
||||
"R0merol",
|
||||
"farisfaikar",
|
||||
"sondrekje",
|
||||
"zachy-ho",
|
||||
"aviegdown",
|
||||
"egorguslyan",
|
||||
"ramnathk",
|
||||
"xia0",
|
||||
"Apsu",
|
||||
|
|
@ -57,6 +60,7 @@
|
|||
"raymon-zhang",
|
||||
"vsenjoyer",
|
||||
"iuuang",
|
||||
"pyxan",
|
||||
"deniscerri",
|
||||
"mtthwn",
|
||||
"joshuamango",
|
||||
|
|
@ -64,17 +68,21 @@
|
|||
"Ahmad-A0",
|
||||
"christophersarmiento",
|
||||
"codybloemhard",
|
||||
"Dainternetdude",
|
||||
"Dioswilson",
|
||||
"71xn",
|
||||
"jacekdobrowolski",
|
||||
"jerryzhou196",
|
||||
"leduyquang753",
|
||||
"mynimi",
|
||||
"Octarine-Phaneron",
|
||||
"iwa",
|
||||
"pran01",
|
||||
"robsassack",
|
||||
"itsmeshibintmz",
|
||||
"TayIorRobinson",
|
||||
"vuong-buihv",
|
||||
"barthakstege",
|
||||
"egorguslyan",
|
||||
"l4ssc",
|
||||
"shishberg",
|
||||
"sombre-hombre",
|
||||
|
|
@ -85,10 +93,12 @@
|
|||
"Abod1960",
|
||||
"iitsalex",
|
||||
"Odyssey346",
|
||||
"avetisovi",
|
||||
"mrbrianevans",
|
||||
"te-lang-wakker",
|
||||
"RealCyGuy",
|
||||
"DKparadox",
|
||||
"JellieTheForg",
|
||||
"EMRD95",
|
||||
"g-thome",
|
||||
"Inirdin",
|
||||
|
|
@ -101,8 +111,10 @@
|
|||
"nocommentcode",
|
||||
"Triikk",
|
||||
"MichaelDeutschCoding",
|
||||
"MushyToast",
|
||||
"ryurina",
|
||||
"SethFalco",
|
||||
"SpiritAxolotl",
|
||||
"tawtis",
|
||||
"tricarbonate",
|
||||
"Vitaman02",
|
||||
|
|
@ -110,17 +122,16 @@
|
|||
"sphaxa",
|
||||
"BarePotato",
|
||||
"alegottu",
|
||||
"angularorbit",
|
||||
"arda-a",
|
||||
"gimmerain4days",
|
||||
"huzqy",
|
||||
"marcoferrari2409",
|
||||
"poldoms",
|
||||
"f1sh33",
|
||||
"t-e-r-m",
|
||||
"precompute",
|
||||
"verbxtim",
|
||||
"zer0-x",
|
||||
"aqeelshamz",
|
||||
"Fuwn",
|
||||
"JannatinNaim",
|
||||
"narze",
|
||||
"tmuplayer33",
|
||||
|
|
@ -143,17 +154,23 @@
|
|||
"xnicoleisaloser",
|
||||
"CoolerFred",
|
||||
"corey-b",
|
||||
"deni-kon",
|
||||
"dCubelic",
|
||||
"dunk2k",
|
||||
"EDUJOS",
|
||||
"elswenson",
|
||||
"ericettensohn",
|
||||
"FabianSt305",
|
||||
"Faris0520",
|
||||
"Fraserbc",
|
||||
"FukurouMakoto",
|
||||
"Fuwn",
|
||||
"GalileoBlues",
|
||||
"shinze",
|
||||
"gkeep",
|
||||
"desert3agle",
|
||||
"inununit",
|
||||
"ianfromdover",
|
||||
"ihorinter",
|
||||
"JacoChong",
|
||||
"Jashmeen",
|
||||
"Jitesh117",
|
||||
|
|
@ -172,6 +189,8 @@
|
|||
"nishu-murmu",
|
||||
"NoCrypt",
|
||||
"nullaf",
|
||||
"O-X-E-Y",
|
||||
"Prajwalrajbasnet",
|
||||
"QuackerDeezles",
|
||||
"DrAlienTech",
|
||||
"psudo-dev",
|
||||
|
|
@ -183,24 +202,31 @@
|
|||
"sohamb117",
|
||||
"stevep99",
|
||||
"Otard95",
|
||||
"sondersketches",
|
||||
"sonderingheights",
|
||||
"samuelxyz",
|
||||
"miyukowo",
|
||||
"Typeacode",
|
||||
"VNKTSH00",
|
||||
"vilgotf",
|
||||
"Yultax",
|
||||
"aungKhantPaing",
|
||||
"carnivoroustoad",
|
||||
"coliss86",
|
||||
"devrusty",
|
||||
"druotoni",
|
||||
"g-harel",
|
||||
"hanabo-mk",
|
||||
"holoflash",
|
||||
"kiriDevs",
|
||||
"krsntn",
|
||||
"mellangr",
|
||||
"paulphys",
|
||||
"riyuzenn",
|
||||
"rogercc03",
|
||||
"ryevertigo",
|
||||
"ryujinscales",
|
||||
"hama73",
|
||||
"tymof1j",
|
||||
"wizpizz",
|
||||
"yekta",
|
||||
"favault",
|
||||
|
|
@ -209,34 +235,34 @@
|
|||
"Eloren1",
|
||||
"kwfk",
|
||||
"Fowl95",
|
||||
"roj1512",
|
||||
"ronnapatp",
|
||||
"victorbnl",
|
||||
"ABHISHEKVALSAN",
|
||||
"AOTREVAI",
|
||||
"SoulNinja-dev",
|
||||
"Aaryab1",
|
||||
"paurana",
|
||||
"Abdulbasit0123",
|
||||
"asd20752",
|
||||
"AdrianSkar",
|
||||
"Aeonimous",
|
||||
"AfonsoVReis",
|
||||
"alex-1121",
|
||||
"ASMaksimov2007",
|
||||
"rossellhayes",
|
||||
"popey456963",
|
||||
"Achess01",
|
||||
"aezexa",
|
||||
"Jeve-Stobs",
|
||||
"yzAlvin",
|
||||
"avetisovi",
|
||||
"radarmeanie",
|
||||
"AndreiSergiuu",
|
||||
"andrewhchang",
|
||||
"angelofallars",
|
||||
"nguyenanhducs",
|
||||
"Architthecoder",
|
||||
"antonkesy",
|
||||
"KillerLava",
|
||||
"ArijanJ",
|
||||
"AronF",
|
||||
"AxoCode",
|
||||
"barraIhsan",
|
||||
"DarthJarJarJar",
|
||||
"Ayce45",
|
||||
"uppercasee",
|
||||
|
|
@ -249,6 +275,8 @@
|
|||
"thescripted",
|
||||
"maixnor",
|
||||
"ujdhesa",
|
||||
"Ocnaibill",
|
||||
"boris-gu",
|
||||
"TTamisier",
|
||||
"Hailfire805",
|
||||
"bragefuglseth",
|
||||
|
|
@ -267,19 +295,26 @@
|
|||
"Cosmeeeen",
|
||||
"cesarcoboscv",
|
||||
"DINOTICK-Dev",
|
||||
"Dampfie93",
|
||||
"danhogan",
|
||||
"DanInSpace104",
|
||||
"danii",
|
||||
"grothe6",
|
||||
"dkrikun",
|
||||
"satelerd",
|
||||
"DarrylBrooks97",
|
||||
"kosorin",
|
||||
"David-Mordechai",
|
||||
"p00ya",
|
||||
"Decipher-CS",
|
||||
"DenelDuck",
|
||||
"D-T-666",
|
||||
"DioneJM",
|
||||
"soul-catcher",
|
||||
"mrhappyma",
|
||||
"drambique",
|
||||
"egemasta",
|
||||
"ehanahamed",
|
||||
"EmNudge",
|
||||
"em1lyy",
|
||||
"rendinjast",
|
||||
|
|
@ -289,23 +324,28 @@
|
|||
"ga-fleury",
|
||||
"Rocheez",
|
||||
"gavinmn",
|
||||
"george124816",
|
||||
"GioSDA",
|
||||
"jo-valer",
|
||||
"guijun13",
|
||||
"groig",
|
||||
"Guillermo-N",
|
||||
"gunungpw",
|
||||
"b-paul",
|
||||
"HachemiH",
|
||||
"Harry-Hopkinson",
|
||||
"DrPoppyseed",
|
||||
"HasanTheSyrian",
|
||||
"meyerhenning",
|
||||
"henriquehbr",
|
||||
"HayataSama",
|
||||
"Iftakharpy",
|
||||
"HISEROD",
|
||||
"IndigoWilke",
|
||||
"zaxophone",
|
||||
"korompaiistvan",
|
||||
"ivolvanov",
|
||||
"j-james",
|
||||
"Mollerz",
|
||||
"Jelso13",
|
||||
"bowski23",
|
||||
|
|
@ -315,19 +355,28 @@
|
|||
"jeroen-meijer",
|
||||
"cincodenada",
|
||||
"jay-tau",
|
||||
"jfrech",
|
||||
"jonathanvoelkle",
|
||||
"JonesSagabaen",
|
||||
"KlopZzz",
|
||||
"jamartinezc",
|
||||
"tackyunicorn",
|
||||
"JustinKolaras",
|
||||
"kacperwyczawski",
|
||||
"kadenscott",
|
||||
"gmkanat",
|
||||
"kat3samsin",
|
||||
"kavinvin",
|
||||
"TKelsier",
|
||||
"KTibow",
|
||||
"KobeCofini",
|
||||
"kraiztmatte",
|
||||
"KyroKrypt",
|
||||
"Schtinguerch",
|
||||
"lgutter",
|
||||
"longnguyen2004",
|
||||
"LukeNk",
|
||||
"HansonSin",
|
||||
"iamardi",
|
||||
"markstos",
|
||||
"Marken-Foo",
|
||||
|
|
@ -340,7 +389,8 @@
|
|||
"teh-maxh",
|
||||
"MaxiMii05",
|
||||
"mia-cx",
|
||||
"NotGate",
|
||||
"Miao4382",
|
||||
"FurriousFox",
|
||||
"Miigon",
|
||||
"roubaobaozi",
|
||||
"MohanadOO",
|
||||
|
|
@ -350,84 +400,36 @@
|
|||
"MyBeansAreBaked",
|
||||
"miktwon",
|
||||
"NaeNate",
|
||||
"ntzm",
|
||||
"slpysiren",
|
||||
"MHNightCat",
|
||||
"Kelvium",
|
||||
"nlundee",
|
||||
"nwk6661",
|
||||
"NolanKarjala",
|
||||
"nottnottloop",
|
||||
"Ocean-Ch",
|
||||
"OldMope",
|
||||
"xiBread",
|
||||
"Oskar283",
|
||||
"outdatedx",
|
||||
"O-X-E-Y",
|
||||
"psparsa",
|
||||
"pablos123",
|
||||
"paulhchoi",
|
||||
"xp4u1",
|
||||
"pserey",
|
||||
"gesslerpd",
|
||||
"PeterMoore24",
|
||||
"pjrelex",
|
||||
"luehmann",
|
||||
"sahupr",
|
||||
"Polyhistorian",
|
||||
"18praneeth",
|
||||
"Prasanta-Hembram",
|
||||
"prathammpurohit",
|
||||
"Alenygam",
|
||||
"quev-dev",
|
||||
"Randomkid88",
|
||||
"RebonackAl",
|
||||
"Hakata-jpn",
|
||||
"rhesamu",
|
||||
"RickHaan",
|
||||
"rishavmngo",
|
||||
"robsassack",
|
||||
"rodovelazquez-utn",
|
||||
"rockingrohit9639",
|
||||
"russell-knight",
|
||||
"ryanshepps",
|
||||
"Rhyzhang",
|
||||
"saieeshb",
|
||||
"samarmohan",
|
||||
"samyak039",
|
||||
"ssantichaivekin",
|
||||
"sarmadhadii",
|
||||
"seanho96",
|
||||
"sergiathanzo",
|
||||
"sartak",
|
||||
"Sheumais",
|
||||
"SimenHolmestad",
|
||||
"sohailakthar",
|
||||
"sourencho",
|
||||
"stiaannel",
|
||||
"sumanarlert",
|
||||
"SwiftyProgrammer690",
|
||||
"clickers331",
|
||||
"phrohdoh",
|
||||
"Edmain1",
|
||||
"TheKaushikGoswami",
|
||||
"tpb1908",
|
||||
"BlueGone",
|
||||
"Root3287",
|
||||
"1rre",
|
||||
"kendlbat",
|
||||
"dudemanppl",
|
||||
"Sixeight",
|
||||
"tsara27",
|
||||
"turinaf",
|
||||
"vansul",
|
||||
"varunKT001",
|
||||
"vimiomori",
|
||||
"victorKochkarev",
|
||||
"zekth",
|
||||
"woosal1337",
|
||||
"voroskoi",
|
||||
"webtax-gh",
|
||||
"Xydez",
|
||||
"ynshung",
|
||||
"zachstence",
|
||||
"zachtepper",
|
||||
"ZaninAndrea",
|
||||
"zealptl",
|
||||
"zphyrj",
|
||||
"seyaidev",
|
||||
"aungKhantPaing"
|
||||
"Hakata-jpn"
|
||||
]
|
||||
|
|
|
|||
|
|
@ -29,6 +29,7 @@
|
|||
"Ed",
|
||||
"Bryan",
|
||||
"Guillaume",
|
||||
"anthony",
|
||||
"katsuu",
|
||||
"Mauricio",
|
||||
"Killian",
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue