瀏覽代碼

Document internal reported value model

Nick Babcock 5 年之前
父節點
當前提交
087ffe694d
共有 1 個文件被更改,包括 39 次插入1 次删除
  1. 39 1
      OhmGraphite/ReportedValue.cs

+ 39 - 1
OhmGraphite/ReportedValue.cs

@@ -21,14 +21,52 @@ namespace OhmGraphite
             HardwareInstance = hwInstance;
         }
 
+        /// <summary>
+        /// A globally unique identifier for each metric. Eg: /amdcpu/0/power/5. This
+        /// identifier can be read as "The 6th power sensor on the 1st amd cpu"
+        /// </summary>
         public string Identifier { get; }
+
+        /// <summary>
+        /// Descriptive name for sensor. Eg: CPU Core #10
+        /// </summary>
         public string Sensor { get; }
+
+        /// <summary>
+        /// The reported sensor reading
+        /// </summary>
         public float Value { get; }
+
+        /// <summary>
+        /// The type of sensor
+        /// </summary>
         public SensorType SensorType { get; }
+
+        /// <summary>
+        /// Descriptive name for the hardware. Eg: AMD Ryzen 7 2700. Note
+        /// that this name does not need to be unique among hardware types such
+        /// as in multi-gpu or multi-hdd setups
+        /// </summary>
         public string Hardware { get; }
+
+        /// <summary>
+        /// The type of hardware the sensor is monitoring
+        /// </summary>
         public HardwareType HardwareType { get; }
+
+        /// <summary>
+        /// The index. The "5" in /amdcpu/0/power/5. There typically isn't
+        /// ambiguity for sensors as they have differing names
+        /// (else wouldn't they be measuring the same thing?)
+        /// </summary>
         public int SensorIndex { get; }
-        public string HardwareInstance { get; }
 
+        /// <summary>
+        /// The disambiguation factor for same hardware (multi-gpu and multi-hdd).
+        /// This is typically the index of the hardware found in the identifier
+        /// (eg: the "0" in /amdcpu/0/power/5). It's not always the index, for
+        /// NIC sensors, the NIC's GUID is used.
+        /// </summary>
+        public string HardwareInstance { get; }
     }
 }