-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
feat: Add benchmarking for encryption/decryption #32
Conversation
benches/encryption_bench.rs
Outdated
pub fn criterion_data_encryption_decryption(c: &mut Criterion) { | ||
let rt = Runtime::new().unwrap(); | ||
let custodian = Custodian::new(Some(("key".to_string(),"value".to_string()))); | ||
let config = config::Config::with_config_path(config::Environment::which(), None); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can directly use Environment::Dev
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, Will update code
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated, please check the code, also create Key using the curl below
let identifier = Identifier::User(String::from("user_12345")); | ||
|
||
{ | ||
let mut group = c.benchmark_group("data-encryption-single"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you create the key user_12345
in the DB before running the bench
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I created a new DataKey using the following api and ran the benchmark, will update the description
curl --location 'localhost:5000/key/create' \
--header 'Content-type: application/json' \
--data '{
"data_identifier": "User",
"key_identifier": "user_12345"
}'
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dracarys18 added the logic to create user at the time of running benchmark. Can you review it again?
Hey @Anupam-1208 Thanks for the PR! I am getting the following error during my first ever run, Likely due to my second comment, Please take a look
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
@Anupam-1208 Please fix formatting and clippy errors |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Anupam-1208 Please fix failing CI checks.
@dracarys18 @ArjunKarthik added formatting changes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Thanks for the contribution @Anupam-1208 |
original issue: [https://github.com/juspay/hyperswitch/issues/6228]
Added benchmarking for Single and Batch data for variable input sizes
Features:
Sample Benchmark: