Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deltas for Convert from microseconds to milliseconds in CosmosDiagnostics #29643

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
ed490e0
Inititial deltas: from microseconds to millisecondsI
kwonus-msft Jun 21, 2022
dadd0ab
Fixed failed implementation that was reporting 0.0 milliseconds due t…
kwonus-msft Jun 21, 2022
54a3f25
Merge branch 'main' of https://github.com/kwonus-msft/azure-sdk-for-j…
kwonus-msft Jun 21, 2022
db61939
Update changelog with PR reference.
kwonus-msft Jun 24, 2022
a1011da
Updated changelog from present tense to past tense (convert ->
kwonus-msft Jun 24, 2022
60a93e5
Merge out from main
kwonus-msft Jun 24, 2022
d8f707f
Shortened the summary in changelog.
kwonus-msft Jun 24, 2022
465de31
dd formatting to changelog
kwonus-msft Jun 24, 2022
b0c4d41
Merge branch 'main' into MicroSeconds-to-Milliseconds-in-CosmosDiagno…
kwonus-msft Jun 24, 2022
e144d1e
[Automation] Generate Fluent Lite from mediaservices#package-account-…
azure-sdk Jun 22, 2022
76420d5
Increment versions for mediaservices releases (#29598)
azure-sdk Jun 22, 2022
a6f1436
DPG, support latest sdk automation design (#29533)
weidongxu-microsoft Jun 22, 2022
0067f1a
Remove coverage profile from service pom (#29572)
srnagar Jun 22, 2022
307354e
Support kafka of azure indentity token credentials and configuration …
yiliuTo Jun 22, 2022
1b02a8e
remove secondary code owner from Search (#29585)
mssfang Jun 22, 2022
94fb521
Mgmt network supports priority (#29503)
XiaofeiCao Jun 22, 2022
9dc53fa
Enable Form Recognizer disabled tests (#29545)
samvaity Jun 22, 2022
4a444eb
Increment dependency versions for Key Vault and Container Registry (#…
vcolin7 Jun 22, 2022
f478529
Progress reporter promoted to core and used in Http Client. (#29495)
kasobol-msft Jun 22, 2022
cbacd2a
Cosmos Spark Connector: Adding .Net/C# port of the NYC-Taxi-Data samp…
FabianMeiswinkel Jun 22, 2022
940e0c0
mgmt, generate desktopvirtualization with async methods in serviceCli…
weidongxu-microsoft Jun 23, 2022
da4260b
Increment versions for desktopvirtualization releases (#29610)
azure-sdk Jun 23, 2022
de59da3
codegen (#29612)
XiaofeiCao Jun 23, 2022
2b77977
Update CODEOWNERS (#29606)
kasobol-msft Jun 23, 2022
e2183be
Use new credential APIs in Spring Service Bus and Event Hubs and add …
saragluna Jun 23, 2022
2475108
[Automation] Generate Fluent Lite from extendedlocation#package-2021-…
azure-sdk Jun 23, 2022
9e83d60
[Automation] Generate Fluent Lite from digitaltwins#package-2022-05 (…
azure-sdk Jun 23, 2022
97fd476
Increment versions for orbital releases (#29614)
azure-sdk Jun 23, 2022
25ea634
Increment versions for extendedlocation releases (#29619)
azure-sdk Jun 23, 2022
070d30b
Implement sendSync in OkHttpClient (#29601)
kasobol-msft Jun 23, 2022
31fd193
Prepare BOM patch release for June 2022 (#29604)
vcolin7 Jun 23, 2022
ecb064f
Enable Batch release for metricsadvisor (#29622)
JimSuplizio Jun 23, 2022
f3a676b
RestProxy Always validate fluxes and inputstreams. (#29603)
kasobol-msft Jun 23, 2022
60e7bbb
rebase again
kwonus-msft Jun 24, 2022
4f29f42
Increment package versions for digitaltwins releases (#29630)
azure-sdk Jun 24, 2022
7a4a9fa
[ISSUE-29566] Add configuration for visibility timeout in StorageQueu…
soumabrata-chakraborty Jun 24, 2022
09667ac
update codegen to 4.1.0 (#29633)
weidongxu-microsoft Jun 24, 2022
9ab5558
mgmt, prepare release 2.16.0 (#29632)
XiaofeiCao Jun 24, 2022
26fa1d5
Fix compatibility tests of deleting range (#29631)
Netyyyy Jun 24, 2022
8c68785
Performance improvement for case insensitive queries (#29597)
trande4884 Jun 24, 2022
7f29bdc
Increment version for resourcemanager releases (#29636)
azure-sdk Jun 24, 2022
dc5b166
Update ResourceManager pipeline to use batch release (#29642)
JimSuplizio Jun 24, 2022
0fbb03b
Tracing docs improvements (#29623)
lmolkova Jun 24, 2022
e475402
Update Dockerfile image references to avoid using external ones (#29626)
milismsft Jun 24, 2022
1d9f2a7
Sync eng/common directory with azure-sdk-tools for PR 3481 (#29625)
azure-sdk Jun 24, 2022
094db2e
Fixed merge conflicts in CHANGELOG
kwonus-msft Jun 24, 2022
ac7532e
Merge out from main
kwonus-msft Jun 24, 2022
b85cde2
Merge branch 'MicroSeconds-to-Milliseconds-in-CosmosDiagnostics' of h…
kwonus-msft Jun 24, 2022
0a633ee
Inadvertantly reversed a delta with a rebase. re-applying.
kwonus-msft Jun 24, 2022
4c1a5ed
Update spotbugs xml. with correct unit string
kwonus-msft Jun 27, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1049,7 +1049,7 @@
<!-- Suppress URF_UNREAD_FIELD, the field is read but during serialization -->
<Match>
<Class name="com.azure.cosmos.implementation.RequestTimeline$Event"/>
<Field name="durationInMicroSec"/>
<Field name="durationInMilliSecs"/>
<Bug pattern="URF_UNREAD_FIELD"/>
</Match>

Expand Down
3 changes: 2 additions & 1 deletion sdk/cosmos/azure-cosmos/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
#### Bugs Fixed

#### Other Changes
* Remove `requires io.netty.transport.epoll` from `module-info`.
* Remove requires `io.netty.transport.epoll` from `module-info`.
* Converted from `durationInMicroSec` to `durationInMilliSecs` in `CosmosDiagnostics` - See [PR 29643](https://github.com/Azure/azure-sdk-for-java/pull/29643)

### 4.31.0 (2022-06-08)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,14 +151,14 @@ public String toString() {
return RntbdObjectMapper.toString(this);
}

@JsonPropertyOrder({ "name", "startTimeUTC", "durationInMicroSec" })
@JsonPropertyOrder({ "name", "startTimeUTC", "durationInMilliSecs" })
public static final class Event {

@JsonIgnore
private final Duration duration;

@JsonProperty
private final long durationInMicroSec;
private final double durationInMilliSecs;

@JsonProperty("eventName")
private final String name;
Expand All @@ -183,9 +183,9 @@ public Event(final String name, final Instant from, final Instant to) {
}

if (duration != null) {
this.durationInMicroSec = duration.toNanos()/1000L;
this.durationInMilliSecs = (double)(duration.toNanos()) / (1000d * 1000d);
kwonus-msft marked this conversation as resolved.
Show resolved Hide resolved
} else {
this.durationInMicroSec = 0;
this.durationInMilliSecs = 0.0D;
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,15 +59,15 @@ public SerializationDiagnosticsSerializer() {

@Override
public void serialize(SerializationDiagnosticsContext.SerializationDiagnostics serializationDiagnostics, JsonGenerator jsonGenerator, SerializerProvider serializerProvider) throws IOException {
Duration durationinMS = serializationDiagnostics.startTimeUTC == null ?
Duration duration = serializationDiagnostics.startTimeUTC == null ?
null : serializationDiagnostics.endTimeUTC == null ?
Duration.ZERO : Duration.between(serializationDiagnostics.startTimeUTC, serializationDiagnostics.endTimeUTC);
jsonGenerator.writeStartObject();
jsonGenerator.writeObjectField("serializationType", serializationDiagnostics.serializationType);
jsonGenerator.writeStringField("startTimeUTC", DiagnosticsInstantSerializer.fromInstant(serializationDiagnostics.startTimeUTC));
jsonGenerator.writeStringField("endTimeUTC", DiagnosticsInstantSerializer.fromInstant(serializationDiagnostics.endTimeUTC));
if (durationinMS != null) {
jsonGenerator.writeNumberField("durationInMicroSec", durationinMS.toNanos() / 1000);
if (duration != null) {
jsonGenerator.writeNumberField("durationInMilliSecs", (double)duration.toNanos() / (1000d * 1000d));
}

jsonGenerator.writeEndObject();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public void serialize(RntbdChannelAcquisitionEvent event,

writer.writeStringField(event.eventType.toString(), event.createdTime.toString());
if (event.completeTime != null) {
writer.writeNumberField("durationInMicroSec",Duration.between(event.createdTime, event.completeTime).toNanos()/1000L);
writer.writeNumberField("durationInMilliSecs", (double) Duration.between(event.createdTime, event.completeTime).toNanos() / (1000d * 1000d));
}

writer.writeEndObject();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ public void serialize(RntbdPollChannelEvent event,

if (event.getCompleteTime() != null) {
writer.writeNumberField(
"durationInMicroSec",
Duration.between(event.getCompleteTime(), event.getCompleteTime()).toNanos()/1000L);
"durationInMilliSecs",
(double) Duration.between(event.getCompleteTime(), event.getCompleteTime()).toNanos() / (1000d * 1000d));
}

if (event.details != null && event.details.size() > 0) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1124,7 +1124,7 @@ private void validateTransportRequestTimelineDirect(String diagnostics) {
assertThat(diagnostics).contains("\"eventName\":\"received\"");
assertThat(diagnostics).contains("\"eventName\":\"completed\"");
assertThat(diagnostics).contains("\"startTimeUTC\"");
assertThat(diagnostics).contains("\"durationInMicroSec\"");
assertThat(diagnostics).contains("\"durationInMilliSecs\"");
}

public void isValidJSON(final String json) {
Expand Down
2 changes: 1 addition & 1 deletion sdk/cosmos/azure-spring-data-cosmos/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ public class AppConfiguration extends AbstractCosmosConfiguration {

@Value("${azure.cosmos.queryMetricsEnabled}")
private boolean queryMetricsEnabled;

@Value("${azure.cosmos.maxDegreeOfParallelism}")
private int maxDegreeOfParallelism;

Expand Down