MCPcopy Create free account
hub / github.com/EngoEngine/ecs / BenchmarkIdiomaticDouble

Function BenchmarkIdiomaticDouble

entity_test.go:469–482  ·  view source on GitHub ↗
(b *testing.B)

Source from the content-addressed store, hash-verified

467}
468
469func BenchmarkIdiomaticDouble(b *testing.B) {
470 preload := func() {}
471 setup := func(w *World) {
472 sys12 := &MySystemOneTwo{}
473 w.AddSystem(sys12)
474
475 e12 := MyEntity12{}
476 e12.BasicEntity = NewBasic()
477
478 sys12.Add(&e12.BasicEntity, &e12.MyComponent1, &e12.MyComponent2)
479 }
480
481 Bench(b, preload, setup)
482}
483
484// Bench is a helper-function to easily benchmark one frame, given a preload / setup function
485func Bench(b *testing.B, preload func(), setup func(w *World)) {

Callers

nothing calls this directly

Calls 4

AddMethod · 0.95
NewBasicFunction · 0.85
BenchFunction · 0.85
AddSystemMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…