One of the benefits of ETW trace files is that they are fully structured. That is to say that they contain well-defined and strongly-typed data payloads, in contrast to raw text log files which only contain message strings. While this…
Decoding EventSource traces
In the previous post, I introduced an EventSource sample. If you run the sample app, the calculator client will continually try to connect to the service and perform random operations, tracing all the while. That’s nice, but how do you…
Better tracing with EventSource
Starting in .NET 4.5, managed code developers finally have a simple way to interact with ETW — System.Diagnostics.Tracing.EventSource. For a quick introduction, check out Vance Morrison’s inaugural blog post on EventSource and the also very helpful feature specification. While EventSource…
Async Process functionality – take 2
In my previous post, I showed a simple way to add a few Task-based async methods for dealing with System.Diagnostics.Process. The code I showed, while simple, has some flaws: It has low cohesion. In violation of the single responsibility principle,…
Real-time trace sessions with Tx
I recently showed an example of how to use TraceEvent to consume events from real-time trace sessions. Today I will show another way using the Tx.Windows NuGet package. Tx (LINQ to Logs and Traces) is an offshoot of the Rx…
Using PLA.dll to manage real-time trace sessions
As previously discussed, PLA.dll can help you collect perf counters, collect ETW trace logs, and create performance alerts. But what about real-time trace sessions? PLA.dll can manage those, too! A real-time trace session has some similarities to a collector set…
Providing async functionality for System.Diagnostics.Process
If you need to interact with processes in .NET, you could do worse than System.Diagnostics.Process. But you could also do a bit better, especially since Process provides no out-of-the-box asynchronous methods. But we can fix that! Let’s devise a ProcessEx…
More about asynchronous cleanup
In a previous post, I showed some sample code to implement a UsingAsync method to handle async cleanup. This is a useful pattern but it starts to break down as the number of items to be cleaned up grows beyond…
Using alerts to drive a load test
In the previous post, I promised to show a practical use case for performance alerts. Today I will make good on this promise and show a complete code sample on how to drive a load test using alerts. Imagine a…
Using PLA.dll to create alerts
In previous posts I’ve covered how to collect perf counters and ETW trace logs using PLA.dll. Today I will discuss the “A” of PLA — performance counter alerts. What are alerts good for? Well, quoting from MSDN, “You can create…