Back    
Priority:
Type:
State:
Assignee:
Subsystem:
Affected versions:
Fixed in:

DTRC-728

Invalid measure time for example

0
using System;
using System.Threading;
using JetBrains.dotTrace.Api;

namespace Test1
{
internal class Program
{
private static void WorkerThread()
{
while (true)
{
Thread.Sleep(2000);
}
}

private static void Main(string[] args)
{
//Create a bunch of workers
for (int i = 0; i < 10; i++)
new Thread(WorkerThread) {Name = ("Worker " + i), IsBackground = true}.Start();

Thread.Sleep(1500);
CPUProfiler.Start();
Thread.Sleep(1000);
for (int i = 0; i < 10000; i++)
{
double j = Math.Sqrt(i);
}
CPUProfiler.StopAndSaveSnapShot();
}
}
}

Issue was closed
Comments (1)
History (0)
Mikhail Pilin Mikhail Pilin 27 Mar 2008 15:16 (15 months ago)
Special thanks for Bruce Thompson who made this test example.