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

Function BenchmarkActorTell

examples/actor/actor_test.go:240–250  ·  view source on GitHub ↗

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

(b *testing.B)

Source from the content-addressed store, hash-verified

238// =============================================================================
239
240func BenchmarkActorTell(b *testing.B) {
241 system := actor.NewSystem("bench")
242 defer system.Shutdown()
243
244 counter := &CounterActor{name: "counter"}
245 pid := system.Spawn(counter, "counter")
246
247 for b.Loop() {
248 pid.Tell(&IncrementMsg{Value: 1})
249 }
250}
251
252func BenchmarkActorRequest(b *testing.B) {
253 system := actor.NewSystem("bench")

Callers

nothing calls this directly

Calls 4

ShutdownMethod · 0.95
SpawnMethod · 0.95
NewSystemFunction · 0.92
TellMethod · 0.80

Tested by

no test coverage detected