MCPcopy Create free account
hub / github.com/astercloud/aster / BenchmarkSystem_SpawnStop

Function BenchmarkSystem_SpawnStop

pkg/actor/actor_test.go:386–395  ·  view source on GitHub ↗
(b *testing.B)

Source from the content-addressed store, hash-verified

384}
385
386func BenchmarkSystem_SpawnStop(b *testing.B) {
387 system := NewSystem("bench")
388 defer system.Shutdown()
389
390 for b.Loop() {
391 pid := system.Spawn(&EchoActor{}, "actor")
392 system.Stop(pid)
393 time.Sleep(time.Microsecond) // 确保清理完成
394 }
395}

Callers

nothing calls this directly

Calls 4

ShutdownMethod · 0.95
SpawnMethod · 0.95
StopMethod · 0.95
NewSystemFunction · 0.85

Tested by

no test coverage detected