public async Task Throughput_GetReady(int messageCount) { IFighter <bool> fighter = new Fighter(); IFighter <bool> proxy = _directory.AsAddress(fighter); Stopwatch watch = Stopwatch.StartNew(); watch.Reset(); await proxy.GetReady(); watch.Stop(); _output.WriteLine("COLD (1 message to warm it up) => "); _output.WriteLine($"{((1 / watch.Elapsed.TotalMilliseconds) * 1000.0):0.000} msg/s"); _output.WriteLine(""); watch.Restart(); for (var i = 0; i < messageCount; i++) { await proxy.GetReady(); } watch.Stop(); _output.WriteLine(""); _output.WriteLine($"HOT ({messageCount:N0} messages) => "); _output.WriteLine($"{((messageCount / watch.Elapsed.TotalMilliseconds) * 1000.0):N2} msg/s"); _output.WriteLine(""); }
public async Task CodeGenVoidTask() { int messageCount = Messages; for (var i = 0; i < messageCount; i++) { await _codegenProxy.GetReady(); } }
public async Task NativeVoidTask() { int messageCount = Messages; for (var i = 0; i < messageCount; i++) { await _staticProxy.GetReady(); } }
public async Task GetReady() { IFighter <bool> fighter = new Fighter(); IFighter <bool> proxy = _directory.AsAddress(fighter); await proxy.GetReady(); }
public ValueTask Invoke() => _target.GetReady();