Skip to content

Conversation

ShubhamChaturvedi7
Copy link
Contributor

Issue #, if available:

Description of changes:
This PR adds a performance tests suite for python. The code was generated by agentic AI and was refactored by author.
Squash/merge commit message, if applicable:

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@ShubhamChaturvedi7 ShubhamChaturvedi7 requested a review from a team as a code owner September 3, 2025 00:08
@ShubhamChaturvedi7 ShubhamChaturvedi7 changed the title feat: perf-test for go feat: perf-test for python Sep 3, 2025
@@ -0,0 +1,31 @@
# ESDK Performance Testing - Python Dependencies
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we need all these dependencies? A fair amount seem unused

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I was relying on linter and formatter to fix this, but apparently it didn't. Fixed it now.


def _create_keyring(self):
"""Create raw AES keyring"""
import secrets
Copy link
Contributor

Choose a reason for hiding this comment

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

These imports should go up top -- I think the MPL is intended to be required for this project so shouldn't need any special consideration

Comment on lines +14 to +19
try:
from aws_encryption_sdk import EncryptionSDKClient, CommitmentPolicy
except ImportError as e:
print(f"Warning: Could not import ESDK modules: {e}")
print("Please install the AWS Encryption SDK: pip install aws-encryption-sdk")
sys.exit(1)
Copy link
Contributor

Choose a reason for hiding this comment

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

I think you can just import this?

Suggested change
try:
from aws_encryption_sdk import EncryptionSDKClient, CommitmentPolicy
except ImportError as e:
print(f"Warning: Could not import ESDK modules: {e}")
print("Please install the AWS Encryption SDK: pip install aws-encryption-sdk")
sys.exit(1)
from aws_encryption_sdk import EncryptionSDKClient, CommitmentPolicy

"peak_memory_mb": 0.0,
"avg_memory_mb": 0.0,
"cumulative_allocations_mb": 0.0,
"memory_efficiency_ratio": 0.0,
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there a README or similar that explains the results JSON? Some fields are obvious but things like this could use an explanation

Co-authored-by: Lucas McDonald <[email protected]>
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