MCPcopy
hub / github.com/EngoEngine/engo / checkBtnConfigOptimal

Function checkBtnConfigOptimal

button_test.go:241–248  ·  view source on GitHub ↗
(b *testing.B)

Source from the content-addressed store, hash-verified

239var btnResult [6]btnState
240
241func checkBtnConfigOptimal(b *testing.B) {
242 for i, cfg := range btnSimpleCfg {
243 btn := Input.Button(cfg.Name)
244 btnResult[i].down = btn.Down()
245 btnResult[i].justUp = btn.JustReleased()
246 btnResult[i].justDown = btn.JustPressed()
247 }
248}
249
250// Benchmark sub-optimal state checks
251func BenchmarkInputMgr_ButtonCleanState(b *testing.B) {

Calls 4

ButtonMethod · 0.80
DownMethod · 0.45
JustReleasedMethod · 0.45
JustPressedMethod · 0.45

Tested by

no test coverage detected