0
こんにちは、パフォーマンスカウンタが追加または削除されていませんか?
私は起動時に以下のコードをrunns IIS7でホストWCFサービスがあります。
if ((_UsePerformanceCounters = bool.Parse(ConfigurationManager.AppSettings["UsePerformanceCounters"])))
{
col = new CounterCreationDataCollection();
counter = new CounterCreationData(_acountOfCurrentUsersCounterName, "Amount of current users", PerformanceCounterType.NumberOfItemsHEX32);
col.Add(counter);
if (PerformanceCounterCategory.Exists(_categoryName))
PerformanceCounterCategory.Delete(_categoryName);
if (!PerformanceCounterCategory.Exists(_categoryName))
category = PerformanceCounterCategory.Create(_categoryName, "MyApp Application Service Counters", PerformanceCounterCategoryType.MultiInstance, col);
else
Console.WriteLine("Counter already exists");
if (PerformanceCounterCategory.CounterExists(_acountOfCurrentUsersCounterName, _categoryName))
_amountOfCurrentUsers = new PerformanceCounter(_categoryName, _acountOfCurrentUsersCounterName, HostingEnvironment.MapPath("~"), false);
}
を私はカテゴリが削除されていることを確認し、毎回を追加しましたが、私はまだcan'tすることができますパフォーマンスモニタでそれを確認できますか?
一度表示されましたが、削除してExists = falseにしても、以前と同じようにカウンタが残りますか?週末後に消えた?
performancemonitorは実現不可能ですか?私が使うべき他のソフトウェアがありますか?それとも私は間違って何をしていますか?