protected List <Common.Monitoring.PerfmonCounterDetails> GetCustomCounters(ArrayList parameters) { List <string> customCounterList = new List <string>(); Common.Monitoring.PerfmonCounterDetails item = new Common.Monitoring.PerfmonCounterDetails(); List <Common.Monitoring.PerfmonCounterDetails> perfmonCounters = new List <Common.Monitoring.PerfmonCounterDetails>(); foreach (var param in parameters) { if (!customCounterList.Contains((string)param, StringComparer.OrdinalIgnoreCase)) { customCounterList.Add(param.ToString()); } } item.Category = "NCache Client"; item.Instance = CacheName; item.Value = 0; foreach (string counter in customCounterList) { item.Counter = counter; perfmonCounters.Add(item); } return(perfmonCounters); }
private List <Common.Monitoring.PerfmonCounterDetails> GetCustomCounters(bool replica, ArrayList parameters) { List <string> customCounterList = new List <string>(); Common.Monitoring.PerfmonCounterDetails item = new Common.Monitoring.PerfmonCounterDetails(); List <Common.Monitoring.PerfmonCounterDetails> perfmonCounters = new List <Common.Monitoring.PerfmonCounterDetails>(); foreach (var param in parameters) { if (!customCounterList.Contains((string)param, StringComparer.OrdinalIgnoreCase)) { customCounterList.Add(param.ToString()); } } item.Category = "NCache"; if (replica == false) { item.Instance = CacheName; } else { item.Instance = CacheName + "-replica"; } //append replica item.Value = 0; foreach (string counter in customCounterList) { item.Counter = counter; perfmonCounters.Add(item); } return(perfmonCounters); //populate list on params and return it }
protected List <Common.Monitoring.PerfmonCounterDetails> GetDefaultCounters() { List <string> DefaultCounterList = new List <string>(); Common.Monitoring.PerfmonCounterDetails item = new Common.Monitoring.PerfmonCounterDetails(); List <Common.Monitoring.PerfmonCounterDetails> perfmonCounters = new List <Common.Monitoring.PerfmonCounterDetails>(); DefaultCounterList.Add("Read Operations/sec"); DefaultCounterList.Add("Write Operations/sec"); DefaultCounterList.Add("Additions/sec"); DefaultCounterList.Add("Deletes/sec"); DefaultCounterList.Add("Fetches/sec"); DefaultCounterList.Add("Updates/sec"); DefaultCounterList.Add("Average Item Size"); DefaultCounterList.Add("Request Queue Size"); item.Category = "NCache Client"; item.Value = 0; item.Instance = CacheName; foreach (string counter in DefaultCounterList) { item.Counter = counter; perfmonCounters.Add(item); } return(perfmonCounters); }
private List <Common.Monitoring.PerfmonCounterDetails> GetDefaultCounters(bool replica = false) { List <string> defaultCounterList = new List <string>(); Common.Monitoring.PerfmonCounterDetails item = new Common.Monitoring.PerfmonCounterDetails(); List <Common.Monitoring.PerfmonCounterDetails> perfmonCounters = new List <Common.Monitoring.PerfmonCounterDetails>(); defaultCounterList.Add("Additions/sec"); defaultCounterList.Add("Cache Size"); defaultCounterList.Add("Count"); defaultCounterList.Add("Deletes/sec"); defaultCounterList.Add("Evictions/sec"); defaultCounterList.Add("Expirations/sec"); defaultCounterList.Add("Fetches/sec"); defaultCounterList.Add("Requests/sec"); defaultCounterList.Add("Updates/sec"); defaultCounterList.Add("Cluster ops/sec"); defaultCounterList.Add("State Transfer/sec"); item.Category = "NCache"; if (replica == false) { item.Instance = CacheName; } else { item.Instance = CacheName + "-replica"; } //append replica item.Value = 0; foreach (string counter in defaultCounterList) { item.Counter = counter; perfmonCounters.Add(item); } return(perfmonCounters); }