VerySleepy / verysleepy

Very Sleepy, a sampling CPU profiler for Windows
http://www.codersnotes.com/sleepy
GNU General Public License v2.0
1.07k stars 105 forks source link

See call counts? #45

Closed vinniefalco closed 7 years ago

vinniefalco commented 7 years ago

First of all, I love this profiler; its lean and gets the job done, unlike vTune and VS Performance Explorer. However, where are the call counts? I'd like to know the number of samples each function received, in its own column in the main panel. This is important for comparing runs after making changes.

Is the information there and I'm just not seeing it? Or is it not there and impossible to report?

CyberShadow commented 7 years ago

Hi, please see https://github.com/VerySleepy/verysleepy/issues/23 and https://github.com/VerySleepy/verysleepy/issues/29#issuecomment-221948260.

vinniefalco commented 7 years ago

I have a question. Lets say that I run my http server under the profiler and then run the benchmark program on it, and then walk away. Eventually the benchmark will finish and the server will idle. Is the function percentage of time affected by how long until I come back before stopping the profiler?

CyberShadow commented 7 years ago

Is the function percentage of time affected by how long until I come back before stopping the profiler?

Yes, I believe so. The idle time is measured as time "spent" in the blocking function that awaits for new events. I suggest you configure your test suite to cause the web server to exit upon completion of the benchmark.

vinniefalco commented 7 years ago

The idle time is measured as time "spent" in the blocking function that awaits for new events.

Having a column for showing the number of samples in which a function is included in would provide a number that is independent of how long the server idles, since my benchmark causes the server to perform the same workload at each launch.

vinniefalco commented 7 years ago

I see you are strongly resisting the addition of this feature :)

CyberShadow commented 7 years ago

Having a column for showing the number of samples in which a function is included in would provide a number that is independent of how long the server idles, since my benchmark causes the server to perform the same workload at each launch.

You can use the "time" column for that purpose.

I see you are strongly resisting the addition of this feature :)

Not sure what you mean here.

vinniefalco commented 7 years ago

You can use the "time" column for that purpose.

That is unhelpful when comparing two different runs which idled for a different amount of time after completing the workload.

CyberShadow commented 7 years ago

That is unhelpful when comparing two different runs which idled for a different amount of time after completing the workload.

The values in the time column associated with the functions from the row they are in indicate the time (measured as elapsed time between samples) where the program was observed to be executing said function (i.e. it was observed in the program's threads' stack frames). So, if you look at the rows for the functions which perform work, that will show you a good approximation of the actual time your program was working.

webloft commented 2 years ago

I don't know if it's impossible to add this feature but I would love to see this feature too since I have some "waiting" functions. So it doesn't really help to see which function wasted much time since these functions are superior and the rest shares "0.00s" stats.

However, an alternative (at least for me) would be to mark those waiting functions to be excluded from the calcuation and also see other time ranges (ms). Could you add this?