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

Conversation

deyaaeldeen
Copy link
Member

Packages impacted by this PR

@azure/schema-registry-avro

Issues associated with this PR

Related to #16983

Describe the problem that is addressed by this PR

Lack of performance tests of the avro serializer

What are the possible designs available to address the problem? If there are more than one possible design, why was the one in this PR chosen?

There're many potential perf tests but I went with one that uses a single schema and serializes an array. Here is a sample output:


> @azure-tests/[email protected] perf-test:node
> ts-node test/index.spec.ts "SerializeTest" "--warmup" "1" "--iterations" "10" "--parallel" "100" "--duration" "15"

=== Starting the perf test ===
=== Creating 100 instance(s) of SerializeTest ===
=== Versions ===
@azure-tests/[email protected] /home/dealmaha/schemaregistry/sdk/schemaregistry/perf-tests/schema-registry-avro
├── @azure/[email protected] -> ./../../../../common/temp/node_modules/.pnpm/@[email protected]/node_modules/@azure/identity
├── @azure/[email protected] -> ./../../schema-registry-avro
├── @azure/[email protected] -> ./../../schema-registry
├── @azure/[email protected] -> ./../../../test-utils/perf
=== Parsed options ===
┌──────────────────────────────┬──────────┬────────────────────────────────────────────────────────────────────────────────────────────────────────────┬───────────┬────────────────────────────────┬──────────────┬───────────┐
│           (index)            │ required │                                                description                                                 │ shortName │            longName            │ defaultValue │   value   │
├──────────────────────────────┼──────────┼────────────────────────────────────────────────────────────────────────────────────────────────────────────┼───────────┼────────────────────────────────┼──────────────┼───────────┤
│         items-count          │  false   │                                          'Number of array items'                                           │    'n'    │         'items-count'          │     1000     │   1000    │
│             help             │          │                                    'Shows all of the available options'                                    │    'h'    │             'help'             │              │ undefined │
│           parallel           │          │                            'How many of the same test to call at the same time'                            │    'p'    │           'parallel'           │      1       │    100    │
│           duration           │          │                                    'When to stop calling tests at all'                                     │    'd'    │           'duration'           │      10      │    15     │
│            warmup            │          │                                      'Duration of warmup in seconds'                                       │    'w'    │            'warmup'            │      5       │     1     │
│          iterations          │          │                             'Times to repeat the whole process, after warmup'                              │    'i'    │          'iterations'          │      1       │    10     │
│          no-cleanup          │          │                                          'Disables test cleanup'                                           │           │          'no-cleanup'          │              │ undefined │
│         test-proxies         │          │                               "URIs of TestProxy servers (separated by ';')"                               │           │         'test-proxies'         │  undefined   │ undefined │
│           insecure           │          │ 'Applied when test-proxies option is defined, connects with https(insecurely by disabling SSL validation)' │   'ins'   │           'insecure'           │    false     │   false   │
│     milliseconds-to-log      │          │                                      'Log frequency in milliseconds'                                       │   'mtl'   │     'milliseconds-to-log'      │     1000     │   1000    │
│ list-transitive-dependencies │          │                   'List all dependencies, instead of only direct ones, before test run'                    │   'ltd'   │ 'list-transitive-dependencies' │    false     │   false   │
└──────────────────────────────┴──────────┴────────────────────────────────────────────────────────────────────────────────────────────────────────────┴───────────┴────────────────────────────────┴──────────────┴───────────┘
=== Calling globalSetup() once for (all) the instance(s) of SerializeTest ===

=== warmup mode, iteration 1. Logs every 1s ===
ElapsedTime	Current		Total		Average
00:01		1554		1554		1553.98
00:02		2		1556		1555.19
00:03		63		1619		1584.07
=== warmup mode, results of iteration 1 ===
Completed 1,653 operations in a weighted-average of 1.04s (1,595.11 ops/s, 0.001 s/op)

=== test mode, iteration 1. Logs every 1s ===
ElapsedTime	Current		Total		Average
=== test mode, results of iteration 1 ===
Completed 675,200 operations in a weighted-average of 15.00s (45,017.53 ops/s, 0.000 s/op)

=== test mode, iteration 2. Logs every 1s ===
ElapsedTime	Current		Total		Average
=== test mode, results of iteration 2 ===
Completed 795,700 operations in a weighted-average of 15.00s (53,045.42 ops/s, 0.000 s/op)

=== test mode, iteration 3. Logs every 1s ===
ElapsedTime	Current		Total		Average
=== test mode, results of iteration 3 ===
Completed 634,300 operations in a weighted-average of 15.01s (42,272.47 ops/s, 0.000 s/op)

=== test mode, iteration 4. Logs every 1s ===
ElapsedTime	Current		Total		Average
=== test mode, results of iteration 4 ===
Completed 566,500 operations in a weighted-average of 15.00s (37,763.46 ops/s, 0.000 s/op)

=== test mode, iteration 5. Logs every 1s ===
ElapsedTime	Current		Total		Average
=== test mode, results of iteration 5 ===
Completed 321,300 operations in a weighted-average of 15.00s (21,419.22 ops/s, 0.000 s/op)

=== test mode, iteration 6. Logs every 1s ===
ElapsedTime	Current		Total		Average
=== test mode, results of iteration 6 ===
Completed 387,400 operations in a weighted-average of 15.01s (25,813.16 ops/s, 0.000 s/op)

=== test mode, iteration 7. Logs every 1s ===
ElapsedTime	Current		Total		Average
=== test mode, results of iteration 7 ===
Completed 389,300 operations in a weighted-average of 15.00s (25,951.76 ops/s, 0.000 s/op)

=== test mode, iteration 8. Logs every 1s ===
ElapsedTime	Current		Total		Average
=== test mode, results of iteration 8 ===
Completed 597,700 operations in a weighted-average of 15.00s (39,846.31 ops/s, 0.000 s/op)

=== test mode, iteration 9. Logs every 1s ===
ElapsedTime	Current		Total		Average
=== test mode, results of iteration 9 ===
Completed 608,800 operations in a weighted-average of 15.00s (40,584.65 ops/s, 0.000 s/op)

=== test mode, iteration 10. Logs every 1s ===
ElapsedTime	Current		Total		Average
=== test mode, results of iteration 10 ===
Completed 580,200 operations in a weighted-average of 15.00s (38,677.77 ops/s, 0.000 s/op)

Are there test cases added in this PR? (If not, why?)

Yes

Provide a list of related PRs (if any)

Command used to generate this PR:**(Applicable only to SDK release request PRs)

Checklists

  • Added impacted package name to the issue description
  • Does this PR needs any fixes in the SDK Generator?** (If so, create an Issue in the Autorest/typescript repository and link it here)
  • Added a changelog (if necessary)

@deyaaeldeen deyaaeldeen enabled auto-merge (squash) March 28, 2022 19:13
@deyaaeldeen deyaaeldeen merged commit 9a046e7 into Azure:main Mar 28, 2022
@deyaaeldeen deyaaeldeen deleted the schemaregistry/add-perf-tests branch March 28, 2022 19:43
azure-sdk pushed a commit to azure-sdk/azure-sdk-for-js that referenced this pull request Oct 17, 2022
Review request for Microsoft.ContainerService to add version 2022-09-02-preview (Azure#21038)

* Adds base for updating Microsoft.ContainerService from version preview/2022-08-03-preview to version 2022-09-02-preview

* Updates readme

* Updates API version in new specs and examples

* Custom CA Trust updates for 20220902 preview version (Azure#20995)

* add create managed cluster example with certs

* add description of custom ca certs in managed cluster security profile json

* better phrasing

* Use dummy base64 encoded values for examples, set format: byte for cert array

* Update specification/containerservice/resource-manager/Microsoft.ContainerService/preview/2022-09-02-preview/managedClusters.json

Co-authored-by: Matthew Christopher <[email protected]>

* update description

* add exception for linter camel case

Co-authored-by: Mikolaj Umanski <[email protected]>
Co-authored-by: Matthew Christopher <[email protected]>

* Containerservice 2022 09 02 preview fleet (Azure#20939)

* Fleet swagger 09-02 api

* Add to README

* Wrong ref

* Add options per lint diff err

* Add headers per lint feedbacks

* Add min and max length

* Add networkProfile.ebpfDataplane field to 20220902preview API (Azure#20955)

* Add HostNetwork NSG Control fields (Azure#20949)

* Update readmes for the 2022-09-02-preview dev branch of container service (Azure#20951)

* update readmes

* undo go readme

* fix tag for python sdk (Azure#21057)

* [containerservice-dev] Revert "Containerservice 2022 09 02 preview fleet (Azure#20939)" (Azure#21073)

* Revert "Containerservice 2022 09 02 preview fleet (Azure#20939)"

This reverts commit 7f9780381fb7d1140cd2a3ff6d3d2dc13d59f900.

* add fleet previous version to readme to pass CI

* Add fleet 0702 base for change comparison (Azure#21093)

* add 07-02-fleet-base

* bump apiversion reference

Co-authored-by: Stephane Erbrech <[email protected]>

* Fleet swagger 09-02 api (Azure#21104)

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

Co-authored-by: Mikołaj Umański <[email protected]>
Co-authored-by: Mikolaj Umanski <[email protected]>
Co-authored-by: Matthew Christopher <[email protected]>
Co-authored-by: Minh Nguyen <[email protected]>
Co-authored-by: Will Daly <[email protected]>
Co-authored-by: ccc <[email protected]>
Co-authored-by: Stéphane Erbrech <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants