我試圖捕捉在Azure WebRole以下PerformanceCounters:無法捕捉性能計數器的Azure的Web角色
private string[] perfCounters = { @"\Processor(_Total)\% Processor Time",
@"\ASP.NET Applications(__Total__)\Requests/Sec",
@"\Memory\Available Bytes",
@"\ASP.NET\Request Execution Time",
@"\ASP.NET\Requests Queued"};
我在WebRole.cs下面的代碼,使這些PERF的計數器捕獲因爲這個:
DiagnosticMonitorConfiguration config = DiagnosticMonitor.GetDefaultInitialConfiguration();
int loggingInterval = Int32.Parse(RoleEnvironment.GetConfigurationSettingValue("loggingInterval"));
config.Logs.ScheduledTransferPeriod = System.TimeSpan.FromMinutes(loggingInterval);
foreach (String s in perCounters)
{
PerformanceCounterConfiguration procTimeConfig = new PerformanceCounterConfiguration();
procTimeConfig.CounterSpecifier = s;
procTimeConfig.SampleRate = System.TimeSpan.FromMinutes(1.0);
config.PerformanceCounters.DataSources.Add(procTimeConfig);
}
config.PerformanceCounters.ScheduledTransferPeriod = System.TimeSpan.FromMinutes(1.0);
DiagnosticMonitor.Start("DiagnosticsConnectionString", config);
正如你所看到的,我將perf計數器的預定xfer週期設置爲1分鐘。
現在,我可以在我的開發結構中的WADPerformanceCounters表中獲得這些計數器,但是我無法將它們置於天藍色的雲上?任何人都可以指出我在這裏做錯了什麼?
卡皮爾
執行VIP交換部署對我來說並沒有什麼用。 – camflint 2014-01-20 17:59:16