Performance Tests: simplify WriteInt so it truly only measures WriteInt

This commit is contained in:
vis2k 2020-11-17 20:47:49 +08:00
parent eaf1df2dc1
commit 54e680f61c

View File

@ -25,15 +25,10 @@ public void RunWriteInt32()
static void WriteInt32()
{
for (int j = 0; j < 1000; j++)
NetworkWriter writer = new NetworkWriter();
for (int i = 0; i < 100000; i++)
{
using (PooledNetworkWriter writer = NetworkWriterPool.GetWriter())
{
for (int i = 0; i < 10; i++)
{
writer.WriteInt32(i * 1000);
}
}
writer.WriteInt32(i);
}
}
// A Test behaves as an ordinary method