github.com/pyroscope-io/pyroscope@v0.37.3-0.20230725203016-5f6947968bd0/examples/dotnet/fast-slow/example/Program.cs (about) 1 namespace Example 2 { 3 public class Program 4 { 5 public static void Main(string[] args) 6 { 7 while (true) 8 { 9 _ = new Fast.Work(); 10 _ = new Slow.Work(); 11 } 12 } 13 } 14 } 15 16 namespace Slow 17 { 18 public class Work 19 { 20 public Work() 21 { 22 var j = 0; 23 for (var i = 0; i < 8000; i++) j++; 24 } 25 } 26 } 27 28 namespace Fast 29 { 30 public class Work 31 { 32 public Work() 33 { 34 var j = 0; 35 for (var i = 0; i < 2000; i++) j++; 36 } 37 } 38 }