#448- Option to Filter Blocking Operations

There needs to be an option to filter blocking operations from the time spent in methods, and propagate that throughout the tree.

For example, if I'm profiling a network server application that services a large number of connections, I'm seeing 25% of the time spent in System.Net.Sockets.Socket.Receive() and another 60% spent in 2 forms of System.Threading.Monitor.Wait().

This makes it very hard to see where the real work is being done. Also, the wait times propagate back to the callers.

This is a crucial option for me.



State of this request was changed from "Submitted" to "To be discussed"

Priority: ?
Planned for version: ]]>


There's a problem with fitering all the wait time from your code: while we can see calls to some functions which just lock thread for some time, many important functions just can't be seen: like Thread.Sleep or Monitor.Enter. We're planning to add displaying wait time with implementing sampling profiling in 2.0


Hi Oleg,

I'm not sure I understand why this can't be implemented as follows:

- Create a list of filtered functions: e.g.
- Allow the user to edit this list
- When the stats are dumped, allow the user to filter out the time spent in methods in the filter list above. Filtered times should be fully filtered out of the call tree. Parent method times should not include time spent in filtered methods called by children.

The one drawback of this approach is that it misses the real work that may be done in methods like Socket.Receive(), but it would still be very, very useful in profiling a highly multi threaded application where most threads are usually in a blocked state. Without filtering the results are very obscured. It is currently extremely hard to guage the results of a change in between runs because the percentage time changes are so small due to the large effects of the time spent in the blocked state.



I totaly agree, that wait time should be filtered, but I agree with devs that it should not be done in name-filtering mode. From the other hand, to look closer at function cost and filter other threads, you can open it in new tab and see it's own times. You will have an option to merge threads or not.


Please sign in to leave a comment.