public static void ValidatePointOperationDiagnostics(CosmosDiagnosticsContext diagnosticsContext) { _ = JObject.Parse(diagnosticsContext.ToString()); PointDiagnosticValidatorHelper validator = new PointDiagnosticValidatorHelper(); validator.Visit(diagnosticsContext); validator.Validate(); }
private static void ValidateQueryPageDiagnostics(QueryPageDiagnostics stats) { Assert.IsNotNull(stats.PartitionKeyRangeId); Assert.IsNotNull(stats.DiagnosticsContext); PointDiagnosticValidatorHelper pointDiagnosticValidatorHelper = new PointDiagnosticValidatorHelper(); pointDiagnosticValidatorHelper.Visit(stats.DiagnosticsContext); string info = stats.ToString(); Assert.IsNotNull(info); JObject jObject = JObject.Parse(info.ToString()); Assert.IsNotNull(jObject["StartUtc"].ToString()); Assert.IsNotNull(jObject["PKRangeId"].ToString()); Assert.IsNotNull(jObject["QueryMetric"].ToString()); Assert.IsNotNull(jObject["Context"].ToString()); }