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

Function BenchmarkSystem_Send

pkg/actor/actor_test.go:363–373  ·  view source on GitHub ↗

============== 基准测试 ==============

(b *testing.B)

Source from the content-addressed store, hash-verified

361// ============== 基准测试 ==============
362
363func BenchmarkSystem_Send(b *testing.B) {
364 system := NewSystem("bench")
365 defer system.Shutdown()
366
367 counter := &CounterActor{}
368 pid := system.Spawn(counter, "counter")
369
370 for b.Loop() {
371 system.Send(pid, &CountMsg{Value: 1})
372 }
373}
374
375func BenchmarkSystem_RequestResponse(b *testing.B) {
376 system := NewSystem("bench")

Callers

nothing calls this directly

Calls 4

ShutdownMethod · 0.95
SpawnMethod · 0.95
SendMethod · 0.95
NewSystemFunction · 0.85

Tested by

no test coverage detected