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

Function BenchmarkInputMgr_ButtonCleanState

button_test.go:251–262  ·  view source on GitHub ↗

Benchmark sub-optimal state checks

(b *testing.B)

Source from the content-addressed store, hash-verified

249
250// Benchmark sub-optimal state checks
251func BenchmarkInputMgr_ButtonCleanState(b *testing.B) {
252 Input = NewInputManager()
253
254 for _, cfg := range btnSimpleCfg {
255 Input.RegisterButton(cfg.Name, cfg.Triggers[0], cfg.Triggers[1])
256 }
257
258 b.ResetTimer()
259 for n := 0; n < b.N; n++ {
260 checkBtnConfigOptimal(b)
261 }
262}
263
264// Benchmark sub-optimal state checks
265func BenchmarkInputMgr_ButtonFilledState(b *testing.B) {

Callers

nothing calls this directly

Calls 3

NewInputManagerFunction · 0.85
checkBtnConfigOptimalFunction · 0.85
RegisterButtonMethod · 0.80

Tested by

no test coverage detected