How do I find all the ETW sessions on the machine?

logman is your tool for this. Here is how you can query for all the sessions and also how to see values from a particular session. c:\> logman -ets Data Collector Set Type Status ——————————————————————————- AITEventLog Trace Running Audio Trace Running DiagLog Trace Running EventLog-Application Trace Running EventLog-System Trace Running NtfsLog Trace Running SQMLogger Trace…

0

Checkin #199390

Here is something for you performance guys. This was a hard one to crack but. Let me know what you think of this and how you would like to see this evolve. It will be a while before this is actually available.     Thanks to Wenlong for driving this all the way and for…

0

Linq over Excel

I was writing a tool and needed to quickly query an excel sheet. I’m not diving into linq but you get general idea of how to query/sort over the datatable and once you have an enumerable object you can pretty easily run a linq query over it. public static DataTable GetData(string filename) { string fullPath…

0

How to synchronize multiple threads?

In certain load tests you want to make sure a bunch of threads reach a particular state before they proceed with the rest of the work. You cannot make sure that all threads execute a point simultaneously since the CPU scheduling would determine this. However you can move these threads to Ready. A ready-thread is…

0

How to throttle callbacks or completions?

WCF enables throttling execution of operations but not their completions. This becomes and issue when a large number of outstanding operations complete almost simultaneously causing the callback on the client to be overwhelmed with completions.  Generally we don’t expect the client to issue of infinite number of pending operations but if you do end up…

0

How to collect stacks during context switches?

With xperf being more and more adopted and with rich stackwalking capabilities, its only natural to use it for finding out bottlenecks and cause for switch out. Findout the ready thread information and what causes the threads to switch out and the associated stack that woke up when a thread switches back in is one…

0

ServiceHosts & executing Operations from a crash/hang dump

Incase you are not sure of how to debug managed code with with a crash/hang dump, then you most likely need to read this first. Once you have SOS and mscordacwks(.net 3.5 and up)  loaded you first dump the heap to find out if you have any services hosts at all. We quickly find the…

0

How to optimize Message Copy using CreateBufferedCopy?

Problem Statement Some broker implementations require creating a copy the message forwarding it over to the backend. The broker also might slightly modify things like addressing headers etc. on the message for proper message routing within the DMZ. The problem is that we see a very high CPU cost in creating this copy message and…

0

Router Implementation – Message Forwarding – Copy/Pass through

For greater flexibility our router can be something like a pass through router. If we are just calling a backend service then we can use a generic contract to receive and forward messages to the back end service as shown below. Here we create a copy of the message to consume locally on the broker…

0