From d9d059e4c1bf236be7bc942ea35df37ac8f65170 Mon Sep 17 00:00:00 2001 From: Jake Willey Date: Wed, 26 May 2021 06:11:06 -0700 Subject: [PATCH 1/3] Direct: Adds 3.19.3 --- Directory.Build.props | 2 +- .../TransportWrapperTests.cs | 3 ++- ...TraceWriterBaselineTests.ScenariosAsync.xml | 2 +- .../Tracing/TraceTests.cs | 3 ++- .../Tracing/TraceWriterBaselineTests.cs | 18 ++++++++++++++++-- 5 files changed, 22 insertions(+), 6 deletions(-) diff --git a/Directory.Build.props b/Directory.Build.props index 95b2df4824..7d0fcfa39d 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -4,7 +4,7 @@ 3.18.0 3.19.0 preview1 - 3.19.1 + 3.19.3 1.0.0-previewV15 1.1.0-preview3 $([MSBuild]::GetPathOfFileAbove('Directory.Build.props', '$(MSBuildThisFileDirectory)../')) diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/TransportWrapperTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/TransportWrapperTests.cs index acda4a4eaa..f32b26c739 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/TransportWrapperTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/TransportWrapperTests.cs @@ -195,7 +195,8 @@ private static void ThrowTransportExceptionOnItemOperation( sessionToken: null, usingLocalLSN: true, activityId: Guid.NewGuid().ToString(), - backendRequestDurationInMs: "0")); + backendRequestDurationInMs: "0", + transportRequestStats: new TransportRequestStats())); throw Documents.Rntbd.TransportExceptions.GetServiceUnavailableException(physicalAddress, Guid.NewGuid(), transportException); diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/BaselineTest/TestBaseline/TraceWriterBaselineTests.ScenariosAsync.xml b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/BaselineTest/TestBaseline/TraceWriterBaselineTests.ScenariosAsync.xml index 718b85458f..b43a6f2051 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/BaselineTest/TestBaseline/TraceWriterBaselineTests.ScenariosAsync.xml +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/BaselineTest/TestBaseline/TraceWriterBaselineTests.ScenariosAsync.xml @@ -1436,7 +1436,7 @@ │ └── Change Feed Transport(00000000-0000-0000-0000-000000000000) Transport-Component MemberName@FilePath:42 12:00:00:000 0.00 milliseconds └── MoveNextAsync(00000000-0000-0000-0000-000000000000) Pagination-Component MemberName@FilePath:42 12:00:00:000 0.00 milliseconds └── [9F-FF-FF-FF-FF-FF-FF-FF-FF-FF-FF-FF-FF-FF-FF-FF,BF-FF-FF-FF-FF-FF-FF-FF-FF-FF-FF-FF-FF-FF-FF-FF) move next(00000000-0000-0000-0000-000000000000) Pagination-Component MemberName@FilePath:42 12:00:00:000 0.00 milliseconds - └── Change Feed Transport(00000000-0000-0000-0000-000000000000) Transport-Component MemberName@FilePath:42 12:00:00:000 0.00 milliseconds + └── Change Feed Transport(00000000-0000-0000-0000-000000000000) Transport-Component MemberName@FilePath:42 12:00:00:000 0.00 milliseconds ]]> CreateDocumentContainerAsync( return documentContainer; } + internal static TransportRequestStats CreateTransportRequestStats() + { + TransportRequestStats transportRequestStats = new TransportRequestStats(); + transportRequestStats.RecordState(TransportRequestStats.RequestStage.Created); + transportRequestStats.RecordState(TransportRequestStats.RequestStage.ChannelAcquisitionStarted); + transportRequestStats.RecordState(TransportRequestStats.RequestStage.Pipelined); + transportRequestStats.RecordState(TransportRequestStats.RequestStage.Sent); + transportRequestStats.RecordState(TransportRequestStats.RequestStage.Received); + transportRequestStats.RecordState(TransportRequestStats.RequestStage.Completed); + return transportRequestStats; + } + private static IQueryPipelineStage CreatePipeline(IDocumentContainer documentContainer, string query, int pageSize = 10, CosmosElement state = null) { TryCatch tryCreatePipeline = PipelineFactory.MonadicCreate( From 1bd23bf4fea0fdc3b97dfa729798b38760b384eb Mon Sep 17 00:00:00 2001 From: Jake Willey Date: Wed, 26 May 2021 08:21:58 -0700 Subject: [PATCH 2/3] Add transport request stats to the diagnostics --- .../Tracing/TraceWriter.TraceJsonWriter.cs | 80 ++++++++++++++----- .../TraceWriterBaselineTests.TraceData.xml | 70 +++++++++++++++- .../Tracing/TraceTests.cs | 2 + .../Tracing/TraceWriterBaselineTests.cs | 35 +++++++- 4 files changed, 166 insertions(+), 21 deletions(-) diff --git a/Microsoft.Azure.Cosmos/src/Tracing/TraceWriter.TraceJsonWriter.cs b/Microsoft.Azure.Cosmos/src/Tracing/TraceWriter.TraceJsonWriter.cs index a8ac1dfdef..a19680692d 100644 --- a/Microsoft.Azure.Cosmos/src/Tracing/TraceWriter.TraceJsonWriter.cs +++ b/Microsoft.Azure.Cosmos/src/Tracing/TraceWriter.TraceJsonWriter.cs @@ -170,7 +170,7 @@ public void Visit(PointOperationStatisticsTraceDatum pointOperationStatisticsTra this.WriteStringValueOrNull(pointOperationStatisticsTraceDatum.ActivityId); this.jsonWriter.WriteFieldName("ResponseTimeUtc"); - this.jsonWriter.WriteStringValue(pointOperationStatisticsTraceDatum.ResponseTimeUtc.ToString("o", CultureInfo.InvariantCulture)); + this.WriteDateTimeStringValue(pointOperationStatisticsTraceDatum.ResponseTimeUtc); this.jsonWriter.WriteFieldName("StatusCode"); this.jsonWriter.WriteNumber64Value((int)pointOperationStatisticsTraceDatum.StatusCode); @@ -215,7 +215,7 @@ public void Visit(ClientSideRequestStatisticsTraceDatum clientSideRequestStatist foreach (ClientSideRequestStatisticsTraceDatum.AddressResolutionStatistics stat in clientSideRequestStatisticsTraceDatum.EndpointToAddressResolutionStatistics.Values) { - VisitAddressResolutionStatistics(stat, this.jsonWriter); + this.VisitAddressResolutionStatistics(stat); } this.jsonWriter.WriteArrayEnd(); @@ -251,10 +251,10 @@ private void VisitHttpResponseStatistics(ClientSideRequestStatisticsTraceDatum.H jsonWriter.WriteObjectStart(); jsonWriter.WriteFieldName("StartTimeUTC"); - jsonWriter.WriteStringValue(stat.RequestStartTime.ToString("o", CultureInfo.InvariantCulture)); + this.WriteDateTimeStringValue(stat.RequestStartTime); jsonWriter.WriteFieldName("EndTimeUTC"); - jsonWriter.WriteStringValue(stat.RequestEndTime.ToString("o", CultureInfo.InvariantCulture)); + this.WriteDateTimeStringValue(stat.RequestEndTime); jsonWriter.WriteFieldName("RequestUri"); jsonWriter.WriteStringValue(stat.RequestUri.ToString()); @@ -292,36 +292,35 @@ private void VisitHttpResponseStatistics(ClientSideRequestStatisticsTraceDatum.H jsonWriter.WriteObjectEnd(); } - private static void VisitAddressResolutionStatistics( - ClientSideRequestStatisticsTraceDatum.AddressResolutionStatistics addressResolutionStatistics, - IJsonWriter jsonWriter) + private void VisitAddressResolutionStatistics( + ClientSideRequestStatisticsTraceDatum.AddressResolutionStatistics addressResolutionStatistics) { - jsonWriter.WriteObjectStart(); + this.jsonWriter.WriteObjectStart(); - jsonWriter.WriteFieldName("StartTimeUTC"); - jsonWriter.WriteStringValue(addressResolutionStatistics.StartTime.ToString("o", CultureInfo.InvariantCulture)); + this.jsonWriter.WriteFieldName("StartTimeUTC"); + this.WriteDateTimeStringValue(addressResolutionStatistics.StartTime); - jsonWriter.WriteFieldName("EndTimeUTC"); + this.jsonWriter.WriteFieldName("EndTimeUTC"); if (addressResolutionStatistics.EndTime.HasValue) { - jsonWriter.WriteStringValue(addressResolutionStatistics.EndTime.Value.ToString("o", CultureInfo.InvariantCulture)); + this.WriteDateTimeStringValue(addressResolutionStatistics.EndTime.Value); } else { - jsonWriter.WriteStringValue("EndTime Never Set."); + this.jsonWriter.WriteStringValue("EndTime Never Set."); } - jsonWriter.WriteFieldName("TargetEndpoint"); + this.jsonWriter.WriteFieldName("TargetEndpoint"); if (addressResolutionStatistics.TargetEndpoint == null) { - jsonWriter.WriteNullValue(); + this.jsonWriter.WriteNullValue(); } else { - jsonWriter.WriteStringValue(addressResolutionStatistics.TargetEndpoint); + this.jsonWriter.WriteStringValue(addressResolutionStatistics.TargetEndpoint); } - jsonWriter.WriteObjectEnd(); + this.jsonWriter.WriteObjectEnd(); } private void VisitStoreResponseStatistics( @@ -330,7 +329,7 @@ private void VisitStoreResponseStatistics( this.jsonWriter.WriteObjectStart(); this.jsonWriter.WriteFieldName("ResponseTimeUTC"); - this.jsonWriter.WriteStringValue(storeResponseStatistics.RequestResponseTime.ToString("o", CultureInfo.InvariantCulture)); + this.WriteDateTimeStringValue(storeResponseStatistics.RequestResponseTime); this.jsonWriter.WriteFieldName("ResourceType"); this.jsonWriter.WriteStringValue(storeResponseStatistics.RequestResourceType.ToString()); @@ -431,6 +430,8 @@ public void Visit(StoreResult storeResult) this.jsonWriter.WriteFieldName("BELatencyInMs"); this.WriteStringValueOrNull(storeResult.BackendRequestDurationInMs); + this.VisitTransportRequestStats(storeResult.TransportRequestStats); + this.jsonWriter.WriteFieldName("TransportException"); TransportException transportException = storeResult.Exception?.InnerException as TransportException; this.WriteStringValueOrNull(transportException?.Message); @@ -470,6 +471,37 @@ private void WriteRegionsContactedArray(string propertyName, IEnumerable<(string this.jsonWriter.WriteArrayEnd(); } + private void VisitTransportRequestStats(TransportRequestStats transportRequestStats) + { + this.jsonWriter.WriteFieldName("RntbdRequestStats"); + if (transportRequestStats == null) + { + this.jsonWriter.WriteNullValue(); + return; + } + + IEnumerable events = transportRequestStats.GetRequestTimeline(); + this.jsonWriter.WriteArrayStart(); + + foreach (TransportRequestStats.RequestEvent requestEvent in events) + { + this.jsonWriter.WriteObjectStart(); + + this.jsonWriter.WriteFieldName("EventName"); + this.jsonWriter.WriteStringValue(requestEvent.EventName); + + this.jsonWriter.WriteFieldName("StartTime"); + this.WriteDateTimeStringValue(requestEvent.StartTime); + + this.jsonWriter.WriteFieldName("DurationInMicroSec"); + this.jsonWriter.WriteStringValue(requestEvent.DurationInMicroSec.ToString(CultureInfo.InvariantCulture)); + + this.jsonWriter.WriteObjectEnd(); + } + + this.jsonWriter.WriteArrayEnd(); + } + /// /// Writes the list of URIs to JSON. /// Sequential duplicates are counted and written as a single object to prevent @@ -535,6 +567,18 @@ private void WriteStringValueOrNull(string value) this.jsonWriter.WriteStringValue(value); } } + + private void WriteDateTimeStringValue(DateTime value) + { + if (value == null) + { + this.jsonWriter.WriteNullValue(); + } + else + { + this.jsonWriter.WriteStringValue(value.ToString("o", CultureInfo.InvariantCulture)); + } + } } } } diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/BaselineTest/TestBaseline/TraceWriterBaselineTests.TraceData.xml b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/BaselineTest/TestBaseline/TraceWriterBaselineTests.TraceData.xml index 66b81fd601..b5c3c33116 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/BaselineTest/TestBaseline/TraceWriterBaselineTests.TraceData.xml +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/BaselineTest/TestBaseline/TraceWriterBaselineTests.TraceData.xml @@ -245,7 +245,8 @@ sessionToken: new SimpleSessionToken(42), usingLocalLSN: true, activityId: Guid.Empty.ToString(), - backendRequestDurationInMs: "4.2"), + backendRequestDurationInMs: "4.2", + transportRequestStats: TraceWriterBaselineTests.CreateTransportRequestStats()), ResourceType.Document, OperationType.Query, uri1); @@ -365,6 +366,38 @@ "StorePhysicalAddress": "http://storephysicaladdress.com/", "RequestCharge": 3.14, "BELatencyInMs": "4.2", + "RntbdRequestStats": [ + { + "EventName": "Created", + "StartTime": "2021-12-31T23:59:59.059Z", + "DurationInMicroSec": "0" + }, + { + "EventName": "ChannelAcquisitionStarted", + "StartTime": "2021-12-31T23:59:59.059Z", + "DurationInMicroSec": "0" + }, + { + "EventName": "Pipelined", + "StartTime": "2021-12-31T23:59:59.059Z", + "DurationInMicroSec": "0" + }, + { + "EventName": "Transit Time", + "StartTime": "2021-12-31T23:59:59.059Z", + "DurationInMicroSec": "0" + }, + { + "EventName": "Received", + "StartTime": "2021-12-31T23:59:59.059Z", + "DurationInMicroSec": "0" + }, + { + "EventName": "Completed", + "StartTime": "2021-12-31T23:59:59.059Z", + "DurationInMicroSec": "0" + } + ], "TransportException": null } } @@ -417,7 +450,8 @@ sessionToken: default, usingLocalLSN: default, activityId: default, - backendRequestDurationInMs: default), + backendRequestDurationInMs: default, + transportRequestStats: TraceWriterBaselineTests.CreateTransportRequestStats()), resourceType: default, operationType: default, locationEndpoint: default); ; @@ -525,6 +559,38 @@ "StorePhysicalAddress": null, "RequestCharge": 0, "BELatencyInMs": null, + "RntbdRequestStats": [ + { + "EventName": "Created", + "StartTime": "2021-12-31T23:59:59.059Z", + "DurationInMicroSec": "0" + }, + { + "EventName": "ChannelAcquisitionStarted", + "StartTime": "2021-12-31T23:59:59.059Z", + "DurationInMicroSec": "0" + }, + { + "EventName": "Pipelined", + "StartTime": "2021-12-31T23:59:59.059Z", + "DurationInMicroSec": "0" + }, + { + "EventName": "Transit Time", + "StartTime": "2021-12-31T23:59:59.059Z", + "DurationInMicroSec": "0" + }, + { + "EventName": "Received", + "StartTime": "2021-12-31T23:59:59.059Z", + "DurationInMicroSec": "0" + }, + { + "EventName": "Completed", + "StartTime": "2021-12-31T23:59:59.059Z", + "DurationInMicroSec": "0" + } + ], "TransportException": null } } diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Tracing/TraceTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Tracing/TraceTests.cs index ab36f9fbfa..8e3de3caab 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Tracing/TraceTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Tracing/TraceTests.cs @@ -139,6 +139,8 @@ public void ValidateStoreResultSerialization() storeResultProperties.Remove(nameof(storeResult.BackendRequestDurationInMs)); storeResultProperties.Add("TransportException"); storeResultProperties.Remove(nameof(storeResult.Exception)); + storeResultProperties.Add("RntbdRequestStats"); + storeResultProperties.Remove(nameof(storeResult.TransportRequestStats)); foreach (string key in jsonPropertyNames) { diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Tracing/TraceWriterBaselineTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Tracing/TraceWriterBaselineTests.cs index f0067f01cb..fa1c675594 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Tracing/TraceWriterBaselineTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Tracing/TraceWriterBaselineTests.cs @@ -11,6 +11,7 @@ namespace Microsoft.Azure.Cosmos.Tests.Tracing using System.IO; using System.Linq; using System.Net.Http; + using System.Reflection; using System.Runtime.CompilerServices; using System.Threading.Tasks; using System.Xml; @@ -712,13 +713,45 @@ private static async Task CreateDocumentContainerAsync( internal static TransportRequestStats CreateTransportRequestStats() { + DateTime defaultDateTime = new DateTime( + year: 2021, + month: 12, + day: 31, + hour: 23, + minute: 59, + second: 59, + millisecond: 59, + kind: DateTimeKind.Utc); + TransportRequestStats transportRequestStats = new TransportRequestStats(); - transportRequestStats.RecordState(TransportRequestStats.RequestStage.Created); transportRequestStats.RecordState(TransportRequestStats.RequestStage.ChannelAcquisitionStarted); transportRequestStats.RecordState(TransportRequestStats.RequestStage.Pipelined); transportRequestStats.RecordState(TransportRequestStats.RequestStage.Sent); transportRequestStats.RecordState(TransportRequestStats.RequestStage.Received); transportRequestStats.RecordState(TransportRequestStats.RequestStage.Completed); + + FieldInfo field = transportRequestStats.GetType().GetField("requestCreatedTime", BindingFlags.NonPublic | BindingFlags.Instance); + field.SetValue(transportRequestStats, defaultDateTime); + + defaultDateTime += TimeSpan.FromMilliseconds(0.01); + field = transportRequestStats.GetType().GetField("channelAcquisitionStartedTime", BindingFlags.NonPublic | BindingFlags.Instance); + field.SetValue(transportRequestStats, defaultDateTime); + + defaultDateTime += TimeSpan.FromMilliseconds(0.01); + field = transportRequestStats.GetType().GetField("requestPipelinedTime", BindingFlags.NonPublic | BindingFlags.Instance); + field.SetValue(transportRequestStats, defaultDateTime); + + defaultDateTime += TimeSpan.FromMilliseconds(0.01); + field = transportRequestStats.GetType().GetField("requestSentTime", BindingFlags.NonPublic | BindingFlags.Instance); + field.SetValue(transportRequestStats, defaultDateTime); + + defaultDateTime += TimeSpan.FromMilliseconds(0.01); + field = transportRequestStats.GetType().GetField("requestReceivedTime", BindingFlags.NonPublic | BindingFlags.Instance); + field.SetValue(transportRequestStats, defaultDateTime); + + defaultDateTime += TimeSpan.FromMilliseconds(0.01); + field = transportRequestStats.GetType().GetField("requestCompletedTime", BindingFlags.NonPublic | BindingFlags.Instance); + field.SetValue(transportRequestStats, defaultDateTime); return transportRequestStats; } From 14e775bf44efcd3d37cef3a7f0606bd0f432fb1c Mon Sep 17 00:00:00 2001 From: Jake Willey Date: Wed, 26 May 2021 08:30:35 -0700 Subject: [PATCH 3/3] Updating it to actually have duration value. --- .../TraceWriterBaselineTests.TraceData.xml | 40 +++++++++---------- .../Tracing/TraceWriterBaselineTests.cs | 10 ++--- 2 files changed, 25 insertions(+), 25 deletions(-) diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/BaselineTest/TestBaseline/TraceWriterBaselineTests.TraceData.xml b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/BaselineTest/TestBaseline/TraceWriterBaselineTests.TraceData.xml index b5c3c33116..aa3d5c7f27 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/BaselineTest/TestBaseline/TraceWriterBaselineTests.TraceData.xml +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/BaselineTest/TestBaseline/TraceWriterBaselineTests.TraceData.xml @@ -370,31 +370,31 @@ { "EventName": "Created", "StartTime": "2021-12-31T23:59:59.059Z", - "DurationInMicroSec": "0" + "DurationInMicroSec": "1000" }, { "EventName": "ChannelAcquisitionStarted", - "StartTime": "2021-12-31T23:59:59.059Z", - "DurationInMicroSec": "0" + "StartTime": "2021-12-31T23:59:59.06Z", + "DurationInMicroSec": "1000" }, { "EventName": "Pipelined", - "StartTime": "2021-12-31T23:59:59.059Z", - "DurationInMicroSec": "0" + "StartTime": "2021-12-31T23:59:59.061Z", + "DurationInMicroSec": "1000" }, { "EventName": "Transit Time", - "StartTime": "2021-12-31T23:59:59.059Z", - "DurationInMicroSec": "0" + "StartTime": "2021-12-31T23:59:59.062Z", + "DurationInMicroSec": "1000" }, { "EventName": "Received", - "StartTime": "2021-12-31T23:59:59.059Z", - "DurationInMicroSec": "0" + "StartTime": "2021-12-31T23:59:59.063Z", + "DurationInMicroSec": "1000" }, { "EventName": "Completed", - "StartTime": "2021-12-31T23:59:59.059Z", + "StartTime": "2021-12-31T23:59:59.064Z", "DurationInMicroSec": "0" } ], @@ -563,31 +563,31 @@ { "EventName": "Created", "StartTime": "2021-12-31T23:59:59.059Z", - "DurationInMicroSec": "0" + "DurationInMicroSec": "1000" }, { "EventName": "ChannelAcquisitionStarted", - "StartTime": "2021-12-31T23:59:59.059Z", - "DurationInMicroSec": "0" + "StartTime": "2021-12-31T23:59:59.06Z", + "DurationInMicroSec": "1000" }, { "EventName": "Pipelined", - "StartTime": "2021-12-31T23:59:59.059Z", - "DurationInMicroSec": "0" + "StartTime": "2021-12-31T23:59:59.061Z", + "DurationInMicroSec": "1000" }, { "EventName": "Transit Time", - "StartTime": "2021-12-31T23:59:59.059Z", - "DurationInMicroSec": "0" + "StartTime": "2021-12-31T23:59:59.062Z", + "DurationInMicroSec": "1000" }, { "EventName": "Received", - "StartTime": "2021-12-31T23:59:59.059Z", - "DurationInMicroSec": "0" + "StartTime": "2021-12-31T23:59:59.063Z", + "DurationInMicroSec": "1000" }, { "EventName": "Completed", - "StartTime": "2021-12-31T23:59:59.059Z", + "StartTime": "2021-12-31T23:59:59.064Z", "DurationInMicroSec": "0" } ], diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Tracing/TraceWriterBaselineTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Tracing/TraceWriterBaselineTests.cs index fa1c675594..12b82b4bc2 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Tracing/TraceWriterBaselineTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Tracing/TraceWriterBaselineTests.cs @@ -733,23 +733,23 @@ internal static TransportRequestStats CreateTransportRequestStats() FieldInfo field = transportRequestStats.GetType().GetField("requestCreatedTime", BindingFlags.NonPublic | BindingFlags.Instance); field.SetValue(transportRequestStats, defaultDateTime); - defaultDateTime += TimeSpan.FromMilliseconds(0.01); + defaultDateTime += TimeSpan.FromMilliseconds(1); field = transportRequestStats.GetType().GetField("channelAcquisitionStartedTime", BindingFlags.NonPublic | BindingFlags.Instance); field.SetValue(transportRequestStats, defaultDateTime); - defaultDateTime += TimeSpan.FromMilliseconds(0.01); + defaultDateTime += TimeSpan.FromMilliseconds(1); field = transportRequestStats.GetType().GetField("requestPipelinedTime", BindingFlags.NonPublic | BindingFlags.Instance); field.SetValue(transportRequestStats, defaultDateTime); - defaultDateTime += TimeSpan.FromMilliseconds(0.01); + defaultDateTime += TimeSpan.FromMilliseconds(1); field = transportRequestStats.GetType().GetField("requestSentTime", BindingFlags.NonPublic | BindingFlags.Instance); field.SetValue(transportRequestStats, defaultDateTime); - defaultDateTime += TimeSpan.FromMilliseconds(0.01); + defaultDateTime += TimeSpan.FromMilliseconds(1); field = transportRequestStats.GetType().GetField("requestReceivedTime", BindingFlags.NonPublic | BindingFlags.Instance); field.SetValue(transportRequestStats, defaultDateTime); - defaultDateTime += TimeSpan.FromMilliseconds(0.01); + defaultDateTime += TimeSpan.FromMilliseconds(1); field = transportRequestStats.GetType().GetField("requestCompletedTime", BindingFlags.NonPublic | BindingFlags.Instance); field.SetValue(transportRequestStats, defaultDateTime); return transportRequestStats;