Follow these steps to calculate benchmarks of anything:
1) Install Nuget Package BenchmarkDotNet
2) Create a public class an add [MemoryDiagnoser] attribute on it