Fix write size in benchmark (#1449)
This commit is contained in:
parent
acf97b6102
commit
0ce111d9f1
|
|
@ -121,8 +121,10 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Performance
|
||||||
|
|
||||||
private void InsertData(byte[] bytes)
|
private void InsertData(byte[] bytes)
|
||||||
{
|
{
|
||||||
|
var buffer = Pipe.Writer.Alloc(2048);
|
||||||
|
buffer.Write(bytes);
|
||||||
// There should not be any backpressure and task completes immediately
|
// There should not be any backpressure and task completes immediately
|
||||||
Pipe.Writer.WriteAsync(bytes).GetAwaiter().GetResult();
|
buffer.FlushAsync().GetAwaiter().GetResult();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void ParseData()
|
private void ParseData()
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue