CPU profiling not recording Thread.Sleep time?
-
- Posts: 72
- Joined: Thu Feb 21, 2008 11:08 am
CPU profiling not recording Thread.Sleep time?
Is CPU profiling not recording Thread.Sleep time? Running 304 version and cant find my thread.sleep timeout.
-
- Posts: 157
- Joined: Wed Aug 15, 2007 9:09 pm
-
- Posts: 72
- Joined: Thu Feb 21, 2008 11:08 am
To clarify
- Button_Click results in a Thread.Sleep(10000)
- No Filters in yourkit!
- Cpu/Call Tree/Time(ms) = 906ms (100%)
Shouldnt it say 10906ms (100%)? And i would see that the 10000ms is spent in Button_Click?
I dont even show up in Hot spots!?
- Have a Form with a button.Im not able to see it in the profiler?
- Button_Click results in a Thread.Sleep(10000)
- No Filters in yourkit!
- Cpu/Call Tree/Time(ms) = 906ms (100%)
Shouldnt it say 10906ms (100%)? And i would see that the 10000ms is spent in Button_Click?
I dont even show up in Hot spots!?
-
- Posts: 1626
- Joined: Tue Aug 10, 2004 7:52 pm
Anton said, that only really consumed CPU time is measured. If the thread is sleeping, it doesn't consume any CPU resource and measured time will be 0. CPU time is not the same as wall time you are measured by stopwatch. That's why you do not see Thread.Sleep()
Best regards,
Vladimir Kondratyev
YourKit, LLC
http://www.yourkit.com
"Don't get lost in data, get information!"
Best regards,
Vladimir Kondratyev
YourKit, LLC
http://www.yourkit.com
"Don't get lost in data, get information!"
-
- Posts: 6172
- Joined: Wed Aug 11, 2004 8:37 am
-
- Posts: 2
- Joined: Tue Feb 26, 2008 8:01 pm
-
- Posts: 6172
- Joined: Wed Aug 11, 2004 8:37 am
What is the exact class and method which you expect to measure that way?I'm looking forward to that feature too. I just had a problem with a big performance leak caused by a slow database query. YourKit-Profiler couldn't give me any hint on this issue, since waiting for the database was no cpu time.
-
- Posts: 2
- Joined: Tue Feb 26, 2008 8:01 pm
It ended up in System.Data.Odbc.OdbcCommand.ExecuteReader() for which the CPU-Time was just some milliseconds. This lead me to the misconclusion that the problem could not be related to a slow database query, and i fixed all sorts of other bottlenecks, but which in total did not bring any big difference, since the real problem was much bigger. Finally two Log-Messages around the ExecuteReader() showed me that this statement took two seconds, since the database query was too complicated.
So a feature like "wall time" would be really helpfull for this kind of problems.
So a feature like "wall time" would be really helpfull for this kind of problems.
-
- Posts: 6172
- Joined: Wed Aug 11, 2004 8:37 am
-
- Posts: 1
- Joined: Fri Sep 19, 2008 8:21 pm
Re: CPU profiling not recording Thread.Sleep time?
Hey,
Is there any ETA on that feature? It would be important for us as well.
Thanks,
Pawel
Is there any ETA on that feature? It would be important for us as well.
Thanks,
Pawel