Skip to content

Instantly share code, notes, and snippets.

@adamjez
Last active May 6, 2017 09:54
Show Gist options
  • Select an option

  • Save adamjez/441e19c16a7a61c0aa518f2c7abc7222 to your computer and use it in GitHub Desktop.

Select an option

Save adamjez/441e19c16a7a61c0aa518f2c7abc7222 to your computer and use it in GitHub Desktop.
BenchmarkDotNet=v0.10.5, OS=ubuntu 16.04
Processor=Intel Xeon CPU E5-2660 0 2.20GHz, ProcessorCount=2
Frequency=1000000000 Hz, Resolution=1.0000 ns, Timer=UNKNOWN
dotnet cli version=2.0.0-preview2-005905
  [Host]     : .NET Core 4.6.25226.02, 64bit RyuJIT
  DefaultJob : .NET Core 4.6.25226.02, 64bit RyuJIT

Method Mean Error StdDev
ProcessStarting 3.495 ms 0.1415 ms 0.4173 ms
class Program
{
static void Main(string[] args)
{
var summary = BenchmarkRunner.Run<Test>();
Console.Write(summary);
}
}
public class Test
{
[Benchmark]
public void ProcessStarting()
{
Process process;
using (process = Process.Start(@"/bin/echo"))
{
while(!process.HasExited)
process.WaitForExit(1);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment