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

Add micro benchmarks. #537

Merged
merged 12 commits into from
Oct 13, 2023
Merged

Add micro benchmarks. #537

merged 12 commits into from
Oct 13, 2023

Conversation

dblock
Copy link
Member

@dblock dblock commented Oct 13, 2023

Description

Adds a set of benchmarks that are easy to run and iterate with.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Signed-off-by: dblock <dblock@amazon.com>
Signed-off-by: dblock <dblock@amazon.com>
Signed-off-by: dblock <dblock@amazon.com>
Signed-off-by: dblock <dblock@amazon.com>
Signed-off-by: dblock <dblock@amazon.com>
…ghput.

Signed-off-by: dblock <dblock@amazon.com>
Signed-off-by: dblock <dblock@amazon.com>
Signed-off-by: dblock <dblock@amazon.com>
Signed-off-by: dblock <dblock@amazon.com>
Signed-off-by: dblock <dblock@amazon.com>
@codecov
Copy link

codecov bot commented Oct 13, 2023

Codecov Report

Merging #537 (d65095d) into main (7a638cd) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main     #537   +/-   ##
=======================================
  Coverage   70.70%   70.70%           
=======================================
  Files          83       83           
  Lines        7857     7857           
=======================================
  Hits         5555     5555           
  Misses       2302     2302           

Copy link
Collaborator

@saimedhi saimedhi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code tested and working.

README.md Outdated
@@ -26,7 +26,7 @@ For more information, see [opensearch.org](https://opensearch.org/) and the [API

## User Guide

To get started with the OpenSearch Python Client, see [User Guide](https://github.com/opensearch-project/opensearch-py/blob/main/USER_GUIDE.md).
To get started with the OpenSearch Python Client, see [User Guide](https://github.com/opensearch-project/opensearch-py/blob/main/USER_GUIDE.md). This repository also contains [working samples](samples) and [benchmarks](benchmarks).
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dblock, Please give complete paths for samples and benchmarks like it is for user_guide. To prevent link checker failure.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed it for this PR, however that feels incorrect because when you're on a branch, you end up navigating to main which may have content that has evolved, or even code moved which then will break the link.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dblock, I agree

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I opened #538. Note that even with the full link it doesn't pass checking because that URL won't exist until the code is merged.

│ sync vs. async (8) │ 3.198 │ 3.198 │ 3.198 │ 0.966 (3.3x) │ 0.966 (3.3x) │ 0.966 (3.3x) │
└───────────────────────────────────┴─────────┴─────────┴─────────┴─────────────────┴─────────────────┴─────────────────┘
```

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please put the commands within a single code block for easier copying? The output can be placed in a separate block or outside of the code block. Thank you!

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

[tool.poetry]
name = "package"
version = "0.1.0"
description = "OpenSearch samples."
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be "OpenSearch benchmarks."?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

Signed-off-by: dblock <dblock@amazon.com>
@saimedhi saimedhi merged commit af263a0 into opensearch-project:main Oct 13, 2023
52 of 53 checks passed
Djcarrillo6 added a commit to Djcarrillo6/opensearch-py that referenced this pull request Oct 14, 2023
Signed-off-by: Djcarrillo6 <djcarrillo6@yahoo.com>

Updated CHANGELOG

Signed-off-by: Djcarrillo6 <djcarrillo6@yahoo.com>

Updated CHANGELOG & link to sample.

Signed-off-by: Djcarrillo6 <djcarrillo6@yahoo.com>

updated changelog (opensearch-project#522)

Signed-off-by: saimedhi <saimedhi@amazon.com>

Bump version to 2.3.2 (opensearch-project#524)

Signed-off-by: saimedhi <saimedhi@amazon.com>

Fix: typos. (opensearch-project#526)

* Fix: typo.

Signed-off-by: dblock <dblock@amazon.com>

* Fix: typo.

Signed-off-by: dblock <dblock@amazon.com>

* Fixed its.

Signed-off-by: dblock <dblock@amazon.com>

* Added Visual Code settings to .gitignore.

Signed-off-by: dblock <dblock@amazon.com>

* Added loop type for async client.

Signed-off-by: dblock <dblock@amazon.com>

---------

Signed-off-by: dblock <dblock@amazon.com>

Modified generator to generate api deprecation warnings (opensearch-project#527)

Signed-off-by: saimedhi <saimedhi@amazon.com>

Generate cat client from API specs (opensearch-project#529)

Signed-off-by: saimedhi <saimedhi@amazon.com>

Generate cluster client from API specs (opensearch-project#530)

Signed-off-by: saimedhi <saimedhi@amazon.com>

Added new guide & sample module for using index templates. (opensearch-project#531)

Added index_template guide and sample

Signed-off-by: Djcarrillo6 <djcarrillo6@yahoo.com>

Removed EOL Python3.5 & bumped urllib3 version to patch security vulnerability (opensearch-project#533)

Updated CHANGELOG with pull #

Updated CHANGELOG with pull #

Updated CHANGELOG removed section.

Updated CHANGELOG removed section again

Signed-off-by: Djcarrillo6 <djcarrillo6@yahoo.com>

Align pool_maxsize for different connection pool implementations. (opensearch-project#535)

* Align pool_maxsize for different connection pool implementations.

Signed-off-by: dblock <dblock@amazon.com>

* Document connection classes and settings.

Signed-off-by: dblock <dblock@amazon.com>

* Undo change in async for backwards compatibility.

Signed-off-by: dblock <dblock@amazon.com>

* Fix: typo.

Signed-off-by: dblock <dblock@amazon.com>

---------

Signed-off-by: dblock <dblock@amazon.com>

Add micro benchmarks. (opensearch-project#537)

* Align pool_maxsize for different connection pool implementations.

Signed-off-by: dblock <dblock@amazon.com>

* Added benchmarks.

Signed-off-by: dblock <dblock@amazon.com>

* Multi-threaded vs. async benchmarks.

Signed-off-by: dblock <dblock@amazon.com>

* Set pool size to the number of threads.

Signed-off-by: dblock <dblock@amazon.com>

* Added sync/async benchmark.

Signed-off-by: dblock <dblock@amazon.com>

* Report client-side latency.

Signed-off-by: dblock <dblock@amazon.com>

* Various updates to benchmarks, demonstrating threading improves throughput.

Signed-off-by: dblock <dblock@amazon.com>

* Bench info.

Signed-off-by: dblock <dblock@amazon.com>

* Fixup format.

Signed-off-by: dblock <dblock@amazon.com>

* Undo async maxsize.

Signed-off-by: dblock <dblock@amazon.com>

* Moved benchmarks folder.

Signed-off-by: dblock <dblock@amazon.com>

* Updated documentation and project description.

Signed-off-by: dblock <dblock@amazon.com>

---------

Signed-off-by: dblock <dblock@amazon.com>
@dblock dblock deleted the benchmarks branch October 16, 2023 13:00
roma2023 pushed a commit to roma2023/opensearch-py that referenced this pull request Dec 28, 2023
* Align pool_maxsize for different connection pool implementations.

Signed-off-by: dblock <dblock@amazon.com>

* Added benchmarks.

Signed-off-by: dblock <dblock@amazon.com>

* Multi-threaded vs. async benchmarks.

Signed-off-by: dblock <dblock@amazon.com>

* Set pool size to the number of threads.

Signed-off-by: dblock <dblock@amazon.com>

* Added sync/async benchmark.

Signed-off-by: dblock <dblock@amazon.com>

* Report client-side latency.

Signed-off-by: dblock <dblock@amazon.com>

* Various updates to benchmarks, demonstrating threading improves throughput.

Signed-off-by: dblock <dblock@amazon.com>

* Bench info.

Signed-off-by: dblock <dblock@amazon.com>

* Fixup format.

Signed-off-by: dblock <dblock@amazon.com>

* Undo async maxsize.

Signed-off-by: dblock <dblock@amazon.com>

* Moved benchmarks folder.

Signed-off-by: dblock <dblock@amazon.com>

* Updated documentation and project description.

Signed-off-by: dblock <dblock@amazon.com>

---------

Signed-off-by: dblock <dblock@amazon.com>
Signed-off-by: roma2023 <romasaparhan19@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants