Comments
Sort by recent activity
RichWildUK wrote:
Hi kay.one,
I wonder, when you first created the profile, what did you select under "default timing display": "CPU" or "Wall Clock"?
I think if you select "Wall Clock" you'll get results out of 100% no matter how many cpus you're using, and I believe it defaults to Wall Clock unless you change it.
rich.
Actually I tried to change it to wall-clock, and the numbers changed like this:
Loops: 4*17%
Console.ReadLine(): 17% / comments
RichWildUK wrote:
Hi kay.one,
I wonder, when you first created the profile, what did you select under "default timing display": "CPU" or "Wall Clock"?
I think if you select "Wall Clock" you'll g...
Then how can this code show 100% time spent on a quad core cpu, string text;
while (true)
{
var text = "Text" + DateTime.Now;
}
Just to make sure that the 100% doesn't mean that its 100 of a core since its running on a single thread, I put this together, class Program
{
static void Main(string[] args)
{
new Thread(Do1).Start();
new Thread(Do2).Start();
new Thread(Do3).Start();
new Thread(Do4).Start();
Console.ReadLine();
}
private static void Do1()
{
while (true)
{
var text = "Text" + DateTime.Now;
}
}
private static void Do2()
{
while (true)
{
var text = "Text" + DateTime.Now;
}
}
private static void Do3()
{
while (true)
{
var text = "Text" + DateTime.Now;
}
}
private static void Do4()
{
while (true)
{
var text = "Text" + DateTime.Now;
}
}
}
which ran on all cores without profiler attached, but when I attached a profiler it started using a single core and each loop showed 24% cpu time,
I am completely lost on what these numbers actually mean, and why does it start running on a single core when profiler is attached!!! / comments
Then how can this code show 100% time spent on a quad core cpu,string text;
while (true)
{
var text = "Text" + DateTime.Now;
}
Just to make sure that the 100% doesn't mean t...