private static void AddUsageObjectIfAvailable(CloudServiceInstanceId instance,MetricValueSet metric,MetricValue value,double? metricValue,string valueName, List<UsageObject> usageObjects) {
			if(metricValue == null) {
				return;
			}
			var usageObject = new UsageObject {
				GraphiteCounterName = instance.BuildGraphiteCounterName(metric.Name,metric.Unit,valueName).ToString(),
				Timestamp = value.Timestamp.ToString("o"),
				Value = metricValue.Value
			};
			usageObjects.Add(usageObject);
		}
Exemple #2
0
        private static void AddUsageObjectIfAvailable(CloudServiceInstanceId instance, MetricValueSet metric, MetricValue value, double?metricValue, string valueName, List <UsageObject> usageObjects)
        {
            if (metricValue == null)
            {
                return;
            }
            var usageObject = new UsageObject {
                GraphiteCounterName = instance.BuildGraphiteCounterName(metric.Name, metric.Unit, valueName).ToString(),
                Timestamp           = value.Timestamp.ToString("o"),
                Value = metricValue.Value
            };

            usageObjects.Add(usageObject);
        }