Don't roll your own criteria. Use well established frameworks to do measurements for you; https://benchmarkdotnet.org/ in the dotnet world for example.