Skip to content

Commit

Permalink
Deltas for Convert from microseconds to milliseconds in CosmosDiagnos…
Browse files Browse the repository at this point in the history
…tics (#29643)

* Inititial deltas: from microseconds to millisecondsI

* Fixed failed implementation that was reporting 0.0 milliseconds due to integer arithmetic

* Update changelog with PR reference.

* Updated changelog from present tense to past tense (convert ->
converted)

* Merge out from main

* Shortened the summary in changelog.

* dd formatting to changelog

* [Automation] Generate Fluent Lite from mediaservices#package-account-2021-11 (#29595)

* [Automation] Generate Fluent Lite from mediaservices#package-account-2021-11

* Update pom.xml

Co-authored-by: Weidong Xu <[email protected]>

* Increment versions for mediaservices releases (#29598)

Increment package versions for mediaservices releases

* DPG, support latest sdk automation design (#29533)

* latest codegen

* support new design of dpg sdk automation

* support EnableBatchRelease

* remove profile for coverage

* Remove coverage profile from service pom (#29572)

* Remove coverage profile from service pom

* update spring service pom

* fix build failures

* fix script that updates service pom

* resourcemanagerhybrid ci

* Support kafka of azure indentity token credentials and configuration (#29404)

* remove secondary code owner from Search (#29585)

* Mgmt network supports priority (#29503)

* codegen

* changelog for version update

* supports priority

supports priority

* session-records

* related session-records

* changelog for feature

* revapi.skip=true

* nit, remove spaces

* Update sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/models/ApplicationGatewayRequestRoutingRule.java

Co-authored-by: Weidong Xu <[email protected]>

* fix doc

* code refactor and fix javadoc

* fix javadoc

* exclude samples from code coverage report

* make exclude projects an argument of the script

* rename script parameter

Co-authored-by: Weidong Xu <[email protected]>

* Enable Form Recognizer disabled tests (#29545)

* Increment dependency versions for Key Vault and Container Registry (#29594)

* Updated dependency versions for Key Vault, Form Recognizer and Container Registry. Also updated Key Vault CHANGELOGs.

* Updated a couple more READMEs.

* Reverted version change for Form Recognizer.

* Progress reporter promoted to core and used in Http Client. (#29495)

* progress reporter.

* contexts

* comment.

* this works.

* progress handlers for http clients.

* vertx.

* fix build.

* changelogs.

* poke ci

* align naming with existing versions.

* functional interface.

* getContext.

* this might come handy.

* some PR feedback.

* remove progress handler after request./

* some feedback.

* add sendSync test.

* wip.

* contexts.

* make it final.

* changelog.

* rename this.

* sample update.

* Update sdk/core/azure-core/src/main/java/com/azure/core/util/ProgressReporter.java

Co-authored-by: Srikanta <[email protected]>

* pr feedback.

* samples in chlog.

* hide keys for now.

Co-authored-by: Srikanta <[email protected]>

* Cosmos Spark Connector: Adding .Net/C# port of the NYC-Taxi-Data sample (#29600)

* mgmt, generate desktopvirtualization with async methods in serviceClient (#29582)

* Increment versions for desktopvirtualization releases (#29610)

Increment package versions for desktopvirtualization releases

* codegen (#29612)

* Update CODEOWNERS (#29606)

* Use new credential APIs in Spring Service Bus and Event Hubs and add more test cases (#29484)

* use new credential APIs in Service Bus and Event Hubs and add more test cases
* fix compatibility error across spring boot versions
* add more tests

* [Automation] Generate Fluent Lite from extendedlocation#package-2021-08-31-preview (#29616)

* [Automation] Generate Fluent Lite from digitaltwins#package-2022-05 (#29615)

* Increment versions for orbital releases (#29614)

Increment package versions for orbital releases

* Increment versions for extendedlocation releases (#29619)

Increment package versions for extendedlocation releases

* Implement sendSync in OkHttpClient (#29601)

* simplify request body creation.

* sync okhttp client.

* test buffered responses.

* chlog.

* body's closeable.

* Prepare BOM patch release for June 2022 (#29604)

* Updated versions to latest stable releases.

* Reverted change to AOT GraalVM's POM on Form Recognizer dependency version to use the latest beta instead of the latest stable. Added a beta entry for Form Recognizer on `version_client.txt`.

* Updated BOM version in POM, README and CHANGELOG.

* Reverted `version_client.txt` and AOT GraalVM POM changes.

* Enable Batch release for metricsadvisor (#29622)

* RestProxy Always validate fluxes and inputstreams. (#29603)

* Always validate fluxes and inputstreams.

* unused.

* rebase again
remove epoll dependency from module-info (#29509)

* remove epoll dependency from module-info

Co-authored-by: annie-mac <[email protected]>
Co-authored-by: annie-mac <[email protected]>
Co-authored-by: annie-mac <[email protected]>
Co-authored-by: annie-mac <[email protected]>

* Increment package versions for digitaltwins releases (#29630)

* [ISSUE-29566] Add configuration for visibility timeout in StorageQueueMessageSource (#29567)

* [ISSUE-29566] Add configuration for visibility timeout in StorageQueueMessageSource

* [ISSUE-29566] Adding documentation to sdk/spring/CHANGELOG

Co-authored-by: Soumabrata Chakraborty <[email protected]>

* update codegen to 4.1.0 (#29633)

* mgmt, prepare release 2.16.0 (#29632)

* version_client.txt

* pom.xml

* readme.md

* changelog.md

* samples.json

* autocent

* Fix compatibility tests of deleting range (#29631)

* fix delete range
* add maven pom
* exclude wiremock-jre8

* Performance improvement for case insensitive queries (#29597)

* Performance update for case insensitive queries. No unit tests needed as functionality is already tested with existing tests.

* Fixing logic error.

* Updating logic to be more accurate, including addinga new CriteriaType function. Also added unit tests.

* Adding performance enhancing logic for IS_EQUAL and unit tests.

* Fixing IS_EQUAL performance logic related to case insensitive search and added unit tests.

* Fixing code style issues.

* Update CriteriaType.java

* Update AbstractQueryGenerator.java

* Update CriteriaType.java

* Update AbstractQueryGenerator.java

* Update AbstractQueryGenerator.java

Co-authored-by: Fabian Meiswinkel <[email protected]>

* Increment version for resourcemanager releases (#29636)

* Increment package version after release of com.azure.resourcemanager azure-resourcemanager-resources

* Increment package version after release of com.azure.resourcemanager azure-resourcemanager-storage

* Increment package version after release of com.azure.resourcemanager azure-resourcemanager-authorization

* Increment package version after release of com.azure.resourcemanager azure-resourcemanager-keyvault

* Increment package version after release of com.azure.resourcemanager azure-resourcemanager-msi

* Increment package version after release of com.azure.resourcemanager azure-resourcemanager-network

* Increment package version after release of com.azure.resourcemanager azure-resourcemanager-compute

* Increment package version after release of com.azure.resourcemanager azure-resourcemanager-sql

* Increment package version after release of com.azure.resourcemanager azure-resourcemanager-dns

* Increment package version after release of com.azure.resourcemanager azure-resourcemanager-cosmos

* Increment package version after release of com.azure.resourcemanager azure-resourcemanager-appservice

* Increment package version after release of com.azure.resourcemanager azure-resourcemanager-containerservice

* Increment package version after release of com.azure.resourcemanager azure-resourcemanager-eventhubs

* Increment package version after release of com.azure.resourcemanager azure-resourcemanager-monitor

* Increment package version after release of com.azure.resourcemanager azure-resourcemanager-containerregistry

* Increment package version after release of com.azure.resourcemanager azure-resourcemanager-appplatform

* Increment package version after release of com.azure.resourcemanager azure-resourcemanager-containerinstance

* Increment package version after release of com.azure.resourcemanager azure-resourcemanager-privatedns

* Increment package version after release of com.azure.resourcemanager azure-resourcemanager-redis

* Increment package version after release of com.azure.resourcemanager azure-resourcemanager-trafficmanager

* Increment package version after release of com.azure.resourcemanager azure-resourcemanager-servicebus

* Increment package version after release of com.azure.resourcemanager azure-resourcemanager-cdn

* Increment package version after release of com.azure.resourcemanager azure-resourcemanager-search

* Increment package version after release of com.azure.resourcemanager azure-resourcemanager

* Update ResourceManager pipeline to use batch release (#29642)

* Update ResourceManager pipeline to use batch release

* Move azure-resourcemanager-samples to AdditionalModules

* Tracing docs improvements (#29623)

* tracing docs update

* Update Dockerfile image references to avoid using external ones (#29626)

For more info on the requirement see https://aka.ms/containers-security-guidance to remove the reference of container images from external registries

* Sync eng/common directory with azure-sdk-tools for PR 3481 (#29625)

* Support local addons path override in stress test deployment

* Support username based deployId in local stress deployment

* Support WhatIf in stress infrastructure provision script

* Simplify stress user detection

Co-authored-by: Wes Haggard <[email protected]>

* Run helm plugin add with helper

* Add WhatIf support to ps module install helper function

Co-authored-by: Ben Broderick Phillips <[email protected]>
Co-authored-by: Wes Haggard <[email protected]>

* Fixed merge conflicts in CHANGELOG

* Merge out from main

* Inadvertantly reversed a delta with a rebase. re-applying.

* Update spotbugs xml. with correct unit string

Co-authored-by: Azure SDK Bot <[email protected]>
Co-authored-by: Weidong Xu <[email protected]>
Co-authored-by: Srikanta <[email protected]>
Co-authored-by: Yi Liu <[email protected]>
Co-authored-by: Shawn Fang <[email protected]>
Co-authored-by: Xiaofei Cao <[email protected]>
Co-authored-by: Sameeksha Vaity <[email protected]>
Co-authored-by: vcolin7 <[email protected]>
Co-authored-by: Kamil Sobol <[email protected]>
Co-authored-by: Fabian Meiswinkel <[email protected]>
Co-authored-by: Xiaolu Dai <[email protected]>
Co-authored-by: James Suplizio <[email protected]>
Co-authored-by: annie-mac <[email protected]>
Co-authored-by: annie-mac <[email protected]>
Co-authored-by: annie-mac <[email protected]>
Co-authored-by: annie-mac <[email protected]>
Co-authored-by: Soumabrata Chakraborty <[email protected]>
Co-authored-by: Soumabrata Chakraborty <[email protected]>
Co-authored-by: Muyao Feng <[email protected]>
Co-authored-by: Trevor Anderson <[email protected]>
Co-authored-by: Liudmila Molkova <[email protected]>
Co-authored-by: Milis <[email protected]>
Co-authored-by: Ben Broderick Phillips <[email protected]>
Co-authored-by: Wes Haggard <[email protected]>
  • Loading branch information
1 parent 1631756 commit f414c17
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 14 deletions.
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);
} 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

0 comments on commit f414c17

Please sign in to comment.