Metrics key/value Equality of metric based on its name
Inheritance: MetricNumericConverter
 /// <summary>
 /// Gets the amount of system memory available. Creates a new instance each time.
 /// </summary>
 public Metric SystemMemoryAvailable()
 {
     return(Metric.Create(StandardMetrics.SystemMemoryAvailable, _systemAvailableMemory.NextValue(), DecayFactor));
 }
 private bool Equals(Metric other)
 {
     return string.Equals(Name, other.Name);
 }
 /// <summary>
 /// Gets the amount of memory used by this particular CLR process. Creates a new instance each time.
 /// </summary>
 public Metric ClrProcessMemoryUsed()
 {
     return(Metric.Create(StandardMetrics.ClrProcessMemoryUsed, Process.GetCurrentProcess().WorkingSet64,
                          DecayFactor));
 }
 /// <summary>
 /// Returns the system load average. Creates a new instance each time.
 /// </summary>
 public Metric SystemLoadAverage()
 {
     return(Metric.Create(StandardMetrics.SystemLoadAverage, _systemLoadAverageCounter.NextValue()));
 }
 /// <summary>
 /// Returns the number of available processors. Creates a new instance each time.
 /// </summary>
 public Metric Processors()
 {
     return(Metric.Create(StandardMetrics.Processors, Environment.ProcessorCount, null));
 }
 private bool Equals(Metric other)
 {
     return(string.Equals(Name, other.Name));
 }
Example #7
0
 /// <summary>
 /// Gets the total amount of system memory. Creates a new instance each time.
 /// </summary>
 public Metric SystemMaxMemory()
 {
     return(Metric.Create(StandardMetrics.SystemMemoryMax,
                          new Microsoft.VisualBasic.Devices.ComputerInfo().TotalPhysicalMemory));
 }