Browse by Tags

Tagged Content List
  • Blog Post: Customizing the behavior of System.Diagnostics.Debug.Assert [Matt Ellis]

    When Inbar posted his refresher on the System.Diagnostics.Debug class , Ron Cain asked an interesting question about Assert in the context of a test harness. Because of this I thought it might be nice to expound on some of the details on exactly how Debug.Assert ends up popping up UI when a failure...
  • Blog Post: BCL Refresher: System.Diagnostics.Debug class [Inbar Gazit]

    Many people told me that they would like to see more blog entries. Not only about the new cool stuff that's coming but also about the old established stuff that's maybe a tad forgotten. So, with the BCL refresher series we're going to go back to talk about existing APIs that are useful and remind you...
  • Blog Post: A new TraceListener in Orcas: EventSchemaTraceListener [Inbar Gazit]

    TraceListener is an abstract class representing a listener object that is used to log event that a TraceSource is producing. In .NET 2.0 we have a few existing implementations such as ConsoleTraceListener for logging events to the standard console and TextWriterTraceListener that is used for logging...
  • Blog Post: Process and ServiceProcess Caching [Robert Villahermosa]

    I’ve seen several questions over the last month or two about refreshing the status of certain properties on the Process and ServiceProcess classes. I’d like to take this opportunity to take a look at an example from both these classes and see how we can resolve these issues. Issue One: Process.MainWindowHandle...
  • Blog Post: How to Read Performance Counters Without Administrator Privileges [Ryan Byington]

    If you have ever tried to read performance counter data on a Windows 2003 machine as a non admin user you will have likely seen an exception like the following: System.UnauthorizedAccessException: Access to the registry key 'Global' is denied. at Microsoft.Win32.RegistryKey...
  • Blog Post: TraceOptions: An Easy Way to Get Common and Useful Data in Traces [Robert Villahermosa]

    I have seen a few recent posts floating around the user community where users have been writing complicated code to get some very simple information such as a timestamp into their traces. As a follow up to this, I’d like to describe the TraceOptions enum and show how it can be used provide some useful...
  • Blog Post: How to Read Performance Counters [Ryan Byington]

    In the time that I have owned performance counters I have seen a lot of code that incorrectly uses the PerformanceCounter class to read counter values. This entry seeks to explain the proper way to read counter values using the PerformanceCounter class. Reading performance counters is not as trivial...
  • Blog Post: A Tracing Primer - Part II (A) [Mike Rousos]

    In my introduction to tracing ( http://blogs.msdn.com/bclteam/archive/2005/03/15/396431.aspx ), I outlined the basics of how to use TraceSources, TraceListeners, and SourceSwitches to trace the flow of an application. I also covered how to configure Whidbey tracing with a configuration file. In this...
  • Blog Post: New Performance Counter Features [Ryan Byington]

    Introduction Before going into detail of the changes in v2.0 I think it is important to start off with explaining the existing problems with the performance counter infrastructure. The first problem is the memory reserved for performance counters is fixed, though the initial size of the memory can be...
  • Blog Post: A Tracing Primer - Part I [Mike Rousos]

    One of the changes in Whidbey will be a revamped tracing system. Much is unchanged - tracing messages are sent through switches to listeners where the data is reported in some fashion. One of the main differences is the inclusion of the TraceSource type. This type will function as the main tracing entity...
  • Blog Post: PerformanceCounters: reading the disk counters [David Gutierrez]

    I see a lot of complaints about counters in the Logical Disk/Physical Disk categories always returning zero when you try to read them. Specifically, using PerformanceCounter.NextValue with these counters always returns zero: % Disk Read Time % Disk Write Time % Idle Time % Disk Time Avg. Disk Queue Length...
  • Blog Post: Get More information about Processes [Gang Peng]

    System.Diagnostics.Process class provides APIs to get lots of information about Process, but it doesn’t expose a few capabilities. For example, you can’t get information about the session id or the owner of a process. We will be exploring additional functionality after the Whidbey release. In the meantime...
  • Blog Post: PerformanceCounters: single instance, multi-instance and WMI [David Gutierrez]

    Performance counter categories come in one of two modes: single instance and multi-instance. If you want your category to be visible through WMI, it's important to know the difference. A single instance category has only one machine wide value for each counter. A good example of a category supplied by...
Page 1 of 1 (13 items)