diff --git a/src/main/performance/READ.ME b/src/main/performance/READ.ME new file mode 100644 index 0000000000000000000000000000000000000000..27fc4520170d265ba68b1e5b782b9e43df76bda4 --- /dev/null +++ b/src/main/performance/READ.ME @@ -0,0 +1,55 @@ +This file describes one approach of doing performance testing +of gRPC services. It uses a simple command line utility called ghz. + +ghz facilitates load testing and benchmarking of gRPC services. +It is intended to be used for testing and debugging services locally, +and in automated continous intergration environments for performance +regression testing. + +Instructions to install, configure and use ghz can be found using this link: +https://ghz.sh/docs/intro. + +For the purpose of testing the the NYNJA account services a number of +JSON config files are provided. Each file has the of the gRPC/endpoint +to be tested with extension .json. + +For example, updateSearchableOption gRPC/endpoint could be tested using +the config file updateSearchableOption.json. The file ocntains: + +{ + "proto": "/account.proto", + "call": "account.AccountService.updateSearchableOption", + "insecure": true, + "n": 2000, + "c": 50, + "d": { + "profileId": "47b50a3e-97d3-4b68-b63d-fb83bb9d2e06", + "authenticationType": "PHONE", + "authenticationIdentifier": "448873598834", + "searchOption": 1 + }, + "host": "" +} + +Configuration options can be found following the above link under +"Options Reference". The ones worth mentioning here are: +- call - the endpoint name - 'package/service/method' +- d - the call data as stringified JSON, i.e the parameters to be send +with the request. + is the actual path to the account.proto file + is the address of the account service as IP address:port. +For example to test on your local machine use "127.0.0.1:6565". + +The way to test an endpoint is to call ghz from the command line like: + + >ghz -config ./updateSearchableOption.json + + +ghz produces some output showing a Summary, Response time histogram and +Latency distribution. + + +To achieve more realistic results it would be beneficial to: +1) runeach test multiple times and get the average results +2) configure each test with data existing in the DB and run it multiple times +3) configure each test with data non-existing in the DB and run it multiple times diff --git a/src/main/performance/addAuthenticationProviderToProfile.json b/src/main/performance/addAuthenticationProviderToProfile.json new file mode 100644 index 0000000000000000000000000000000000000000..6b0e20cf5b0de9282f098750f303b4608a923511 --- /dev/null +++ b/src/main/performance/addAuthenticationProviderToProfile.json @@ -0,0 +1,12 @@ +{ + "proto": "/account.proto", + "call": "account.AccountService.addAuthenticationProviderToProfile", + "insecure": true, + "n": 2000, + "c": 50, + "d": { + "profileId": "123e4567-e89b-12d3-a456-426655440011", + "authenticationProvider":{"authenticationType": "PHONE", "authenticationProvider": "448873598834"} + }, + "host": "" +} diff --git a/src/main/performance/addContactInfoToAccount.json b/src/main/performance/addContactInfoToAccount.json new file mode 100644 index 0000000000000000000000000000000000000000..80543d2126d0b66a78d44bff9a8d9b73051bd7a2 --- /dev/null +++ b/src/main/performance/addContactInfoToAccount.json @@ -0,0 +1,12 @@ +{ + "proto": "/account.proto", + "call": "account.AccountService.addContactInfoToAccount", + "insecure": true, + "n": 2000, + "c": 50, + "d": { + "accountId": "ac6d30c3-1e87-4932-ae0f-ebc9c9873b35", + "contactInfo":{"type": "PHONE_CONTACT", "value": "448873598834", "label": "The_Label"} + }, + "host": "" +} diff --git a/src/main/performance/completePendingAccountCreation.json b/src/main/performance/completePendingAccountCreation.json new file mode 100644 index 0000000000000000000000000000000000000000..1302b4af6fa3fbd3c5217115398615cf18d49d2e --- /dev/null +++ b/src/main/performance/completePendingAccountCreation.json @@ -0,0 +1,13 @@ +{ + "proto": "/account.proto", + "call": "account.AccountService.completePendingAccountCreation", + "insecure": true, + "n": 2000, + "c": 50, + "d": { + "accountId": "47b50a3e-97d3-4b68-b63d-fb83bb9d2e06", + "accountName": "Name of account", + "firstName": "Atanas" + }, + "host": "" +} diff --git a/src/main/performance/createPendingAccount.json b/src/main/performance/createPendingAccount.json new file mode 100644 index 0000000000000000000000000000000000000000..b0b1a337452e4ff6b3b6fac0b48af55109eae610 --- /dev/null +++ b/src/main/performance/createPendingAccount.json @@ -0,0 +1,12 @@ +{ + "proto": "/account.proto", + "call": "account.AccountService.createPendingAccount", + "insecure": true, + "n": 2000, + "c": 50, + "d": { + "authenticationType": "EMAIL", + "authenticationProvider": "pepi.toshev@msn.com" + }, + "host": "" +} diff --git a/src/main/performance/deleteAccount.json b/src/main/performance/deleteAccount.json new file mode 100644 index 0000000000000000000000000000000000000000..1904039f840f839139ace30a15b0c2a18cb5bb96 --- /dev/null +++ b/src/main/performance/deleteAccount.json @@ -0,0 +1,11 @@ +{ + "proto": "/account.proto", + "call": "account.AccountService.deleteAccount", + "insecure": true, + "n": 2000, + "c": 50, + "d": { + "accountId": "47b50a3e-97d3-4b68-b63d-fb83bb9d2e06" + }, + "host": "" +} diff --git a/src/main/performance/deleteAuthenticationProviderFromProfile.json b/src/main/performance/deleteAuthenticationProviderFromProfile.json new file mode 100644 index 0000000000000000000000000000000000000000..130b2df4e60b581279d59b692141b8bf3d5e1077 --- /dev/null +++ b/src/main/performance/deleteAuthenticationProviderFromProfile.json @@ -0,0 +1,12 @@ +{ + "proto": "/account.proto", + "call": "account.AccountService.deleteAuthenticationProviderFromProfile", + "insecure": true, + "n": 2000, + "c": 50, + "d": { + "profileId": "ac6d30c3-1e87-4932-ae0f-ebc9c9873b35", + "authenticationProvider":{"authenticationType": "EMAIL", "authenticationProvider": "bill.gates@msn.com", "searchOption": "SEARCH_ENABLED"} + }, + "host": "" +} diff --git a/src/main/performance/deleteContactInfoFromAccount.json b/src/main/performance/deleteContactInfoFromAccount.json new file mode 100644 index 0000000000000000000000000000000000000000..90a444a9994aa2948709c4df647b623a1836d8b0 --- /dev/null +++ b/src/main/performance/deleteContactInfoFromAccount.json @@ -0,0 +1,12 @@ +{ + "proto": "/account.proto", + "call": "account.AccountService.deleteContactInfoFromAccount", + "insecure": true, + "n": 2000, + "c": 50, + "d": { + "accountId": "ac6d30c3-1e87-4932-ae0f-ebc9c9873b35", + "contactInfo":{"type": "PHONE_CONTACT", "value": "448873598834", "label": "The_Label"} + }, + "host": "" +} diff --git a/src/main/performance/deleteProfile.json b/src/main/performance/deleteProfile.json new file mode 100644 index 0000000000000000000000000000000000000000..f1bf0d0b0ba41c622acc6f3c85b12efd8c923be4 --- /dev/null +++ b/src/main/performance/deleteProfile.json @@ -0,0 +1,11 @@ +{ + "proto": "/account.proto", + "call": "account.AccountService.deleteProfile", + "insecure": true, + "n": 2000, + "c": 50, + "d": { + "profileId": "47b50a3e-97d3-4b68-b63d-fb83bb9d2e06" + }, + "host": "" +} diff --git a/src/main/performance/editContactInfoForAccount.json b/src/main/performance/editContactInfoForAccount.json new file mode 100644 index 0000000000000000000000000000000000000000..bed30955434c0ab15ab73857b45b0cc5dedc4db5 --- /dev/null +++ b/src/main/performance/editContactInfoForAccount.json @@ -0,0 +1,13 @@ +{ + "proto": "/account.proto", + "call": "account.AccountService.editContactInfoForAccount", + "insecure": true, + "n": 2000, + "c": 50, + "d": { + "accountId": "ac6d30c3-1e87-4932-ae0f-ebc9c9873b35", + "oldContactInfo":{"type": "PHONE_CONTACT", "value": "448873598834", "label": "The_Label"}, + "editedContactInfo":{"type": "PHONE_CONTACT", "value": "448873598877", "label": "New_Label"} + }, + "host": "" +} diff --git a/src/main/performance/getAccountByAccountId.json b/src/main/performance/getAccountByAccountId.json new file mode 100644 index 0000000000000000000000000000000000000000..04f08097f55fda56cedaa3cef7db4f02a71ca78b --- /dev/null +++ b/src/main/performance/getAccountByAccountId.json @@ -0,0 +1,11 @@ +{ + "proto": "/account.proto", + "call": "account.AccountService.getAccountByAccountId", + "insecure": true, + "n": 2000, + "c": 50, + "d": { + "accountId": "ac6d30c3-1e87-4932-ae0f-ebc9c9873b35" + }, + "host": "127.0.0.1:6565" +} diff --git a/src/main/performance/getAccountByCreationProvider.json b/src/main/performance/getAccountByCreationProvider.json new file mode 100644 index 0000000000000000000000000000000000000000..1609cf67f386ac04b2f8ac7cd6f90b1354c8b4c3 --- /dev/null +++ b/src/main/performance/getAccountByCreationProvider.json @@ -0,0 +1,12 @@ +{ + "proto": "/account.proto", + "call": "account.AccountService.getAccountByCreationProvider", + "insecure": true, + "n": 2000, + "c": 50, + "d": { + "authenticationType": "EMAIL", + "authenticationIdentifier": "pepi.toshev@msn.com" + }, + "host": "" +} diff --git a/src/main/performance/getAccountByLoginOption.json b/src/main/performance/getAccountByLoginOption.json new file mode 100644 index 0000000000000000000000000000000000000000..77c6ad1e38f0a70b1af043aecc07d7f06cdb2691 --- /dev/null +++ b/src/main/performance/getAccountByLoginOption.json @@ -0,0 +1,12 @@ +{ + "proto": "/account.proto", + "call": "account.AccountService.getAccountByLoginOption", + "insecure": true, + "n": 2000, + "c": 50, + "d": { + "authenticationType": "PHONE", + "authenticationIdentifier": "448873598834" + }, + "host": "" +} diff --git a/src/main/performance/getAccountByQrCode.json b/src/main/performance/getAccountByQrCode.json new file mode 100644 index 0000000000000000000000000000000000000000..d516f44ba3bd0b162120aa26c11c82e781605219 --- /dev/null +++ b/src/main/performance/getAccountByQrCode.json @@ -0,0 +1,11 @@ +{ + "proto": "/account.proto", + "call": "account.AccountService.getAccountByQrCode", + "insecure": true, + "n": 2000, + "c": 50, + "d": { + "qrCode": "qrCoded" + }, + "host": "" +} diff --git a/src/main/performance/getAllAccountsByProfileId.json b/src/main/performance/getAllAccountsByProfileId.json new file mode 100644 index 0000000000000000000000000000000000000000..b2992ec2f73abe1d057a23e23d4d74c6ef4d5fe8 --- /dev/null +++ b/src/main/performance/getAllAccountsByProfileId.json @@ -0,0 +1,11 @@ +{ + "proto": "/account.proto", + "call": "account.AccountService.getAllAccountsByProfileId", + "insecure": true, + "n": 2000, + "c": 50, + "d": { + "profileId": "47b50a3e-97d3-4b68-b63d-fb83bb9d2e06" + }, + "host": "" +} diff --git a/src/main/performance/getProfileByProfileId.json b/src/main/performance/getProfileByProfileId.json new file mode 100644 index 0000000000000000000000000000000000000000..c45a75284153cba5cb630aea2058f5723c6c1172 --- /dev/null +++ b/src/main/performance/getProfileByProfileId.json @@ -0,0 +1,11 @@ +{ + "proto": "/account.proto", + "call": "account.AccountService.getProfileByProfileId", + "insecure": true, + "n": 2000, + "c": 50, + "d": { + "profileId": "ac6d30c3-1e87-4932-ae0f-ebc9c9873b35" + }, + "host": "" +} diff --git a/src/main/performance/searchByEmail.json b/src/main/performance/searchByEmail.json new file mode 100644 index 0000000000000000000000000000000000000000..c1ce6cf8410ce77d7390121d72157b99adb76e65 --- /dev/null +++ b/src/main/performance/searchByEmail.json @@ -0,0 +1,11 @@ +{ + "proto": "/account.proto", + "call": "account.AccountService.searchByEmail", + "insecure": true, + "n": 2000, + "c": 50, + "d": { + "email": "gogo@yahoo.com" + }, + "host": "" +} diff --git a/src/main/performance/searchByPhoneNumber.json b/src/main/performance/searchByPhoneNumber.json new file mode 100644 index 0000000000000000000000000000000000000000..4ca967a79b154356a777b3cfb2484762a7f8912f --- /dev/null +++ b/src/main/performance/searchByPhoneNumber.json @@ -0,0 +1,11 @@ +{ + "proto": "/account.proto", + "call": "account.AccountService.searchByPhoneNumber", + "insecure": true, + "n": 2000, + "c": 50, + "d": { + "phoneNumber": "359888777995" + }, + "host": "" +} diff --git a/src/main/performance/searchByQrCode.json b/src/main/performance/searchByQrCode.json new file mode 100644 index 0000000000000000000000000000000000000000..4103974bf51ca4bf404406cb30354fb43b8d1a23 --- /dev/null +++ b/src/main/performance/searchByQrCode.json @@ -0,0 +1,11 @@ +{ + "proto": "/account.proto", + "call": "account.AccountService.searchByQrCode", + "insecure": true, + "n": 2000, + "c": 50, + "d": { + "qrCode": "qrCoded" + }, + "host": "" +} diff --git a/src/main/performance/searchBySocialProvider.json b/src/main/performance/searchBySocialProvider.json new file mode 100644 index 0000000000000000000000000000000000000000..9e1e782791c93c6136e59bad4fe162abeeaef992 --- /dev/null +++ b/src/main/performance/searchBySocialProvider.json @@ -0,0 +1,12 @@ +{ + "proto": "/account.proto", + "call": "account.AccountService.searchBySocialProvider", + "insecure": true, + "n": 2000, + "c": 50, + "d": { + "authenticationType": "PHONE", + "authenticationIdentifier": "448873598834" + }, + "host": "" +} diff --git a/src/main/performance/searchByUsername.json b/src/main/performance/searchByUsername.json new file mode 100644 index 0000000000000000000000000000000000000000..5ef8f7a610b3f980c890f687b4c5c89faf9d3866 --- /dev/null +++ b/src/main/performance/searchByUsername.json @@ -0,0 +1,11 @@ +{ + "proto": "/account.proto", + "call": "account.AccountService.getAccountByUsername", + "insecure": true, + "n": 2000, + "c": 50, + "d": { + "username": "PetarPetrov" + }, + "host": "" +} diff --git a/src/main/performance/updateAccount.json b/src/main/performance/updateAccount.json new file mode 100644 index 0000000000000000000000000000000000000000..d4bbe399fe1ba76cb7b2568e33a4488b8a07de9d --- /dev/null +++ b/src/main/performance/updateAccount.json @@ -0,0 +1,13 @@ +{ + "proto": "/account.proto", + "call": "account.AccountService.updateAccount", + "insecure": true, + "n": 2000, + "c": 50, + "d": { + "accountId": "0994566e-ac7b-45b2-b6ef-36440e44a15a", + "username": "acctIvanv", + "firstName": "Neda" + }, + "host": "" +} diff --git a/src/main/performance/updateAuthenticationProviderForProfile.json b/src/main/performance/updateAuthenticationProviderForProfile.json new file mode 100644 index 0000000000000000000000000000000000000000..e8c132f0a77e1ea1d74374fb681b308b73205572 --- /dev/null +++ b/src/main/performance/updateAuthenticationProviderForProfile.json @@ -0,0 +1,13 @@ +{ + "proto": "/account.proto", + "call": "account.AccountService.updateAuthenticationProviderForProfile", + "insecure": true, + "n": 2000, + "c": 50, + "d": { + "profileId": "ac6d30c3-1e87-4932-ae0f-ebc9c9873b35", + "oldAuthProvider":{"authenticationType": "PHONE", "authenticationProvider": "448873598834", "searchOption": 1}, + "updatedAuthProvider":{"authenticationType": "PHONE", "authenticationProvider": "448873598877", "searchOption": 1} + }, + "host": "" +} diff --git a/src/main/performance/updateSearchableOption.json b/src/main/performance/updateSearchableOption.json new file mode 100644 index 0000000000000000000000000000000000000000..1ee14d73d218315d3b21dbcee261220190914642 --- /dev/null +++ b/src/main/performance/updateSearchableOption.json @@ -0,0 +1,14 @@ +{ + "proto": "/account.proto", + "call": "account.AccountService.updateSearchableOption", + "insecure": true, + "n": 2000, + "c": 50, + "d": { + "profileId": "47b50a3e-97d3-4b68-b63d-fb83bb9d2e06", + "authenticationType": "PHONE", + "authenticationIdentifier": "448873598834", + "searchOption": 1 + }, + "host": "" +}