Exemplo n.º 1
0
        public void WrappedPerformanceCategorySpecificNamesTest_VerifyPagingFileCounters()
        {
            WindowsPerformanceLiason   liason      = new WindowsPerformanceLiason();
            WrappedPerformanceCategory ourCategory = liason.CacheCountersForCategory(
                "Paging File", "_Total");
            IDictionary <string, WrappedPerformanceCounter> allCounters = ourCategory.GetCounters();
            WrappedPerformanceCounter ourTargetCounter = allCounters["% Usage"];

            Assert.IsNotNull(ourTargetCounter);
            Assert.IsTrue(ourTargetCounter.CounterIsReadOnly());
            Assert.IsFalse(ourTargetCounter.CounterHasAssociatedBase());
            Assert.IsNotNull(ourCategory.NextValue("% Usage"));
        }
 public void WrappedPerformanceCounterTest_VerifyEmptyCounterToBeWrapped()
 {
     Assert.IsNull(WrappedPerformanceCounter.GetBaseTypeForCounter(null));
 }