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

Conversation

kwonus-msft
Copy link
Contributor

@kwonus-msft kwonus-msft commented Jun 24, 2022

Convert from microseconds to milliseconds in CosmosDiagnostics

  • replaced "durationInMicroSec" with to "durationInMilliSecs"
  • changed type from long to double

All unit tests in CosmosDiagnosticsTest.directDiagnostics succeed.

See BEFORE and AFTER json:

BEFORE:

{
	"userAgent": "azsdk-java-cosmos/4.30.0-beta.1 MacOSX/10.16 JRE/11.0.9",
	"activityId": "35bd0585-d861-11ec-91ca-557614f5ee01",
	"requestLatencyInMs": 1659,
	"requestStartTimeUTC": "2022-05-20T17:20:56.661308Z",
	"requestEndTimeUTC": "2022-05-20T17:20:58.321295Z",
	"responseStatisticsList": [{
		"storeResult": {
			"storePhysicalAddress": "rntbd://cdb-ms-prod-westus3-fd5.documents.azure.com:14355/apps/4fa7d6d1-fe2d-4ea8-91db-371d0f714771/services/78d95b5c-04e9-4717-b935-cb33221b4265/partitions/04774560-111d-40c8-82bc-e62260b1cb10/replicas/132968520422408365p/",
			"lsn": 701,
			"globalCommittedLsn": 701,
			"partitionKeyRangeId": "0",
			"isValid": true,
			"statusCode": 200,
			"subStatusCode": 0,
			"isGone": false,
			"isNotFound": false,
			"isInvalidPartition": false,
			"isThroughputControlRequestRateTooLarge": false,
			"requestCharge": 1.0,
			"itemLSN": 3,
			"sessionToken": "0:0#701#1=-1",
			"backendLatencyInMs": 0.2,
			"transportRequestTimeline": [{
				"eventName": "created",
				"startTimeUTC": "2022-05-20T17:20:57.496631Z",
				"durationInMicroSec": 75060
			}, {
				"eventName": "queued",
				"startTimeUTC": "2022-05-20T17:20:57.571691Z",
				"durationInMicroSec": 91
			}, {
				"eventName": "channelAcquisitionStarted",
				"startTimeUTC": "2022-05-20T17:20:57.571782Z",
				"durationInMicroSec": 652267
			}, {
				"eventName": "pipelined",
				"startTimeUTC": "2022-05-20T17:20:58.224049Z",
				"durationInMicroSec": 33206
			}, {
				"eventName": "transitTime",
				"startTimeUTC": "2022-05-20T17:20:58.257255Z",
				"durationInMicroSec": 38215
			}, {
				"eventName": "decodeTime",
				"startTimeUTC": "2022-05-20T17:20:58.295470Z",
				"durationInMicroSec": 5768
			}, {
				"eventName": "received",
				"startTimeUTC": "2022-05-20T17:20:58.301238Z",
				"durationInMicroSec": 16161
			}, {
				"eventName": "completed",
				"startTimeUTC": "2022-05-20T17:20:58.317399Z",
				"durationInMicroSec": 18
			}]
		},
		"requestResponseTimeUTC": "2022-05-20T17:20:58.321295Z",
		"requestResourceType": "Document",
		"requestOperationType": "Read"
	}]
}

AFTER:

{
	"userAgent": "azsdk-java-cosmos/4.30.0-beta.1 MacOSX/10.16 JRE/11.0.9",
	"activityId": "35bd0585-d861-11ec-91ca-557614f5ee01",
	"requestLatencyInMs": 1659,
	"requestStartTimeUTC": "2022-05-20T17:20:56.661308Z",
	"requestEndTimeUTC": "2022-05-20T17:20:58.321295Z",
	"responseStatisticsList": [{
		"storeResult": {
			"storePhysicalAddress": "rntbd://cdb-ms-prod-westus3-fd5.documents.azure.com:14355/apps/4fa7d6d1-fe2d-4ea8-91db-371d0f714771/services/78d95b5c-04e9-4717-b935-cb33221b4265/partitions/04774560-111d-40c8-82bc-e62260b1cb10/replicas/132968520422408365p/",
			"lsn": 701,
			"globalCommittedLsn": 701,
			"partitionKeyRangeId": "0",
			"isValid": true,
			"statusCode": 200,
			"subStatusCode": 0,
			"isGone": false,
			"isNotFound": false,
			"isInvalidPartition": false,
			"isThroughputControlRequestRateTooLarge": false,
			"requestCharge": 1.0,
			"itemLSN": 3,
			"sessionToken": "0:0#701#1=-1",
			"backendLatencyInMs": 0.2,
			"transportRequestTimeline": [{
				"eventName": "created",
				"startTimeUTC": "2022-05-20T17:20:57.496631Z",
				"durationInMilliSecs": 75.060
			}, {
				"eventName": "queued",
				"startTimeUTC": "2022-05-20T17:20:57.571691Z",
				"durationInMilliSecs": 0.091
			}, {
				"eventName": "channelAcquisitionStarted",
				"startTimeUTC": "2022-05-20T17:20:57.571782Z",
				"durationInMilliSecs": 652.267
			}, {
				"eventName": "pipelined",
				"startTimeUTC": "2022-05-20T17:20:58.224049Z",
				"durationInMilliSecs": 33.206
			}, {
				"eventName": "transitTime",
				"startTimeUTC": "2022-05-20T17:20:58.257255Z",
				"durationInMilliSecs": 38.215
			}, {
				"eventName": "decodeTime",
				"startTimeUTC": "2022-05-20T17:20:58.295470Z",
				"durationInMilliSecs": 5.768
			}, {
				"eventName": "received",
				"startTimeUTC": "2022-05-20T17:20:58.301238Z",
				"durationInMilliSecs": 16.161
			}, {
				"eventName": "completed",
				"startTimeUTC": "2022-05-20T17:20:58.317399Z",
				"durationInMilliSecs": 0.018
			}]
		},
		"requestResponseTimeUTC": "2022-05-20T17:20:58.321295Z",
		"requestResourceType": "Document",
		"requestOperationType": "Read"
	}]
}

// Given that the type for durationInMilliSecs is a double, the fractional portion of the decimal may contain
// more than three digits to the right of the decimal point (unlike the sample above); The example above
// illustrates the type difference AND the unit difference.

@check-enforcer
Copy link

This pull request is protected by Check Enforcer.

What is Check Enforcer?

Check Enforcer helps ensure all pull requests are covered by at least one check-run (typically an Azure Pipeline). When all check-runs associated with this pull request pass then Check Enforcer itself will pass.

Why am I getting this message?

You are getting this message because Check Enforcer did not detect any check-runs being associated with this pull request within five minutes. This may indicate that your pull request is not covered by any pipelines and so Check Enforcer is correctly blocking the pull request being merged.

What should I do now?

If the check-enforcer check-run is not passing and all other check-runs associated with this PR are passing (excluding license-cla) then you could try telling Check Enforcer to evaluate your pull request again. You can do this by adding a comment to this pull request as follows:
/check-enforcer evaluate
Typically evaulation only takes a few seconds. If you know that your pull request is not covered by a pipeline and this is expected you can override Check Enforcer using the following command:
/check-enforcer override
Note that using the override command triggers alerts so that follow-up investigations can occur (PRs still need to be approved as normal).

What if I am onboarding a new service?

Often, new services do not have validation pipelines associated with them, in order to bootstrap pipelines for a new service, you can issue the following command as a pull request comment:
/azp run prepare-pipelines
This will run a pipeline that analyzes the source tree and creates the pipelines necessary to build and validate your pull request. Once the pipeline has been created you can trigger the pipeline using the following comment:
/azp run java - [service] - ci

@kwonus-msft kwonus-msft changed the title Deltas for Convert from microseconds to milliseconds in CosmosDiagnostics #28621 Deltas for Convert from microseconds to milliseconds in CosmosDiagnostics Jun 24, 2022
@xinlian12
Copy link
Member

Can we add a diagnostics output sample in the description part?

saragluna and others added 26 commits June 24, 2022 19:10
…more test cases (Azure#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
Increment package versions for orbital releases
Increment package versions for extendedlocation releases
* simplify request body creation.

* sync okhttp client.

* test buffered responses.

* chlog.

* body's closeable.
* 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.
* Always validate fluxes and inputstreams.

* unused.
remove epoll dependency from module-info (Azure#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]>
…eMessageSource (Azure#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]>
* version_client.txt

* pom.xml

* readme.md

* changelog.md

* samples.json

* autocent
* fix delete range
* add maven pom
* exclude wiremock-jre8
* 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 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

* Move azure-resourcemanager-samples to AdditionalModules
…e#29626)

For more info on the requirement see https://aka.ms/containers-security-guidance to remove the reference of container images from external registries
* 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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
azure-spring All azure-spring related issues Cosmos
Projects
None yet
Development

Successfully merging this pull request may close these issues.