Beispiel #1
0
        private static void PrintMinuteMetrics(CloudAnalyticsClient analyticsClient)
        {
            var services = Enum.GetValues(typeof(StorageService));

            foreach (StorageService service in services)
            {
                Console.WriteLine($"Minute Metrics for Service {service}");
                var metricsQuery = analyticsClient.CreateMinuteMetricsQuery(service, StorageLocation.Primary);
                var t            = analyticsClient.GetMinuteMetricsTable(service);
                var opContext    = new OperationContext();
                var query        =
                    from entity in metricsQuery
                    select entity;

                var results      = query.ToList().Where(m => m.RowKey.StartsWith("user"));
                var resultString = results.Aggregate(new StringBuilder(), (builder, metrics) => builder.AppendLine(MetricsString(metrics, opContext))).ToString();
                Console.WriteLine($"{resultString}");
            }
        }
Beispiel #2
0
 /// <summary>
 /// Gets the minute metrics table for the specified storage service.
 /// </summary>
 /// <param name="service"></param>
 /// <returns></returns>
 public CloudTable GetMinuteMetricsTable()
 {
     return(analyticsClient.GetMinuteMetricsTable(service));
 }