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

Function BenchmarkSystem_RequestResponse

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

Source from the content-addressed store, hash-verified

373}
374
375func BenchmarkSystem_RequestResponse(b *testing.B) {
376 system := NewSystem("bench")
377 defer system.Shutdown()
378
379 pid := system.Spawn(&EchoActor{}, "echo")
380
381 for i := 0; b.Loop(); i++ {
382 _, _ = system.Request(pid, &PingMsg{Count: i}, time.Second)
383 }
384}
385
386func BenchmarkSystem_SpawnStop(b *testing.B) {
387 system := NewSystem("bench")

Callers

nothing calls this directly

Calls 4

ShutdownMethod · 0.95
SpawnMethod · 0.95
RequestMethod · 0.95
NewSystemFunction · 0.85

Tested by

no test coverage detected