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

[Schema Registry Avro] Add a serialize performance test #21057

Merged
merged 3 commits into from
Mar 28, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
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
79 changes: 51 additions & 28 deletions common/config/rush/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions rush.json
Original file line number Diff line number Diff line change
Expand Up @@ -851,6 +851,11 @@
"projectFolder": "sdk/template/perf-tests/template",
"versionPolicyName": "test"
},
{
"packageName": "@azure-tests/perf-schema-registry-avro",
"projectFolder": "sdk/schemaregistry/perf-tests/schema-registry-avro",
"versionPolicyName": "test"
},
{
"packageName": "@azure/mixed-reality-remote-rendering",
"projectFolder": "sdk/remoterendering/mixed-reality-remote-rendering",
Expand Down
11 changes: 11 additions & 0 deletions sdk/schemaregistry/perf-tests/schema-registry-avro/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Performance Testing for Avro Serializer

## Instructions

1. Build the schema-registry perf tests package `rush build -t perf-schema-registry-avro`.
2. Copy the `sample.env` file and name it as `.env`.
3. Create an Event Hubs account and populate the `.env` file with the relevant credentials.
4. Run the tests as follows

- detect language
- `npm run perf-test:node -- SerializeTest --warmup 1 --iterations 10 --parallel 100 --duration 15 --items-count 1000`
49 changes: 49 additions & 0 deletions sdk/schemaregistry/perf-tests/schema-registry-avro/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
{
"name": "@azure-tests/perf-schema-registry-avro",
"sdk-type": "perf-test",
"version": "1.0.0",
"description": "",
"main": "",
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
"@azure/schema-registry": "^1.0.0",
"@azure/schema-registry-avro": "^1.0.0-beta.7",
"@azure/identity": "^2.0.1",
"@azure/test-utils-perf": "^1.0.0",
"dotenv": "^8.2.0"
},
"devDependencies": {
"@types/node": "^12.0.0",
"eslint": "^7.15.0",
"prettier": "^2.5.1",
"rimraf": "^3.0.0",
"tslib": "^2.2.0",
"ts-node": "^10.0.0",
"typescript": "~4.2.0"
},
"private": true,
"scripts": {
"perf-test:node": "ts-node test/index.spec.ts",
"audit": "node ../../../common/scripts/rush-audit.js && rimraf node_modules package-lock.json && npm i --package-lock-only 2>&1 && npm audit",
"build": "npm run clean && tsc -p .",
"build:samples": "echo skipped",
"build:test": "echo skipped",
"check-format": "prettier --list-different --config ../../../../.prettierrc.json --ignore-path ../../../../.prettierignore \"test/**/*.ts\" \"*.{js,json}\"",
"clean": "rimraf dist dist-* types *.tgz *.log",
"format": "prettier --write --config ../../../../.prettierrc.json --ignore-path ../../../../.prettierignore \"test/**/*.ts\" \"*.{js,json}\"",
"integration-test:browser": "echo skipped",
"integration-test:node": "echo skipped",
"integration-test": "echo skipped",
"lint:fix": "eslint --no-eslintrc -c ../../../.eslintrc.internal.json package.json test --ext .ts --fix --fix-type [problem,suggestion]",
"lint": "eslint --no-eslintrc -c ../../../.eslintrc.internal.json package.json test --ext .ts",
"pack": "npm pack 2>&1",
"unit-test:browser": "echo skipped",
"unit-test:node": "echo skipped",
"unit-test": "echo skipped",
"test:browser": "echo skipped",
"test:node": "echo skipped",
"test": "echo skipped"
}
}
20 changes: 20 additions & 0 deletions sdk/schemaregistry/perf-tests/schema-registry-avro/sample.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
SCHEMA_REGISTRY_ENDPOINT=<Endpoint URL>
SCHEMA_REGISTRY_GROUP=<Group name for schemas in registry>

deyaaeldeen marked this conversation as resolved.
Show resolved Hide resolved
# Used to authenticate using Azure AD as a service principal for role-based authentication
# in the tokenAuth sample.
#
# See the documentation for `EnvironmentCredential` at the following link:
# https://docs.microsoft.com/javascript/api/@azure/identity/environmentcredential
AZURE_TENANT_ID=<AD tenant id or name>
AZURE_CLIENT_ID=<ID of the user/service principal to authenticate as>
AZURE_CLIENT_SECRET=<client secret used to authenticate to Azure AD>

# Used in samples that use Event Hubs. Retrieve these values from an Event Hub in the Azure portal.
EVENTHUB_CONNECTION_STRING=<Event Hub connection string>
EVENTHUB_NAME=<Event Hub name>
CONSUMER_GROUP_NAME=<Event Hub Group name>

# Used in samples that use Event Grid. Retrieve these values from an Event Grid topic in the Azure portal
EVENT_GRID_TOPIC_ENDPOINT=<Event Grid topic endpoint>
EVENT_GRID_TOPIC_API_KEY=<Event Grid topic API key>
Loading