{"id":19934490,"url":"https://github.com/openssl/perftools","last_synced_at":"2025-05-03T12:30:40.011Z","repository":{"id":248126409,"uuid":"824168181","full_name":"openssl/perftools","owner":"openssl","description":"Performance testing tools","archived":false,"fork":false,"pushed_at":"2025-03-31T15:47:00.000Z","size":65,"stargazers_count":4,"open_issues_count":4,"forks_count":6,"subscribers_count":18,"default_branch":"main","last_synced_at":"2025-04-26T22:52:02.605Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/openssl.png","metadata":{"files":{"readme":"README","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"custom":"https://openssl-foundation.org/sponsorship/"}},"created_at":"2024-07-04T13:54:51.000Z","updated_at":"2025-04-14T17:56:39.000Z","dependencies_parsed_at":"2024-07-12T15:28:17.218Z","dependency_job_id":"4e508b2b-d8ca-498c-bd6d-956e64fa94ca","html_url":"https://github.com/openssl/perftools","commit_stats":null,"previous_names":["openssl/perftools"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openssl%2Fperftools","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openssl%2Fperftools/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openssl%2Fperftools/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openssl%2Fperftools/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/openssl","download_url":"https://codeload.github.com/openssl/perftools/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252190483,"owners_count":21708889,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-12T23:16:59.007Z","updated_at":"2025-05-03T12:30:40.005Z","avatar_url":"https://github.com/openssl.png","language":"C","funding_links":["https://openssl-foundation.org/sponsorship/"],"categories":[],"sub_categories":[],"readme":"Performance testing tools\n=========================\n\nThis directory holds tools for carrying out performance tests on OpenSSL.\n\nThe various performance test applications are held within this directory, and\nvarious helper files are held in perflib.\n\nThe performance test applications are intended to be linked against a supported\nOpenSSL version, e.g. 3.1, 3.0, 1.1.1 - which is the version of OpenSSL that\nis to be tested. Typically we would expect the apps to be built multiple times\n(once for each target OpenSSL version to be tested).\n\nTo build the tests we assume that the target OpenSSL has already been built.\nTwo environment variables are required:\n\nTARGET_OSSL_INCLUDE_PATH: Points to a directory where the OpenSSL include files\nare held (e.g. typically \"include\" under the build directory).\n\nTARGET_OSSL_LIBRARY_PATH: Points to a directory where libcrypto.so and libssl.so\nare contained.\n\nTo build:\n\nexport TARGET_OSSL_INCLUDE_PATH=/path/to/openssl/include\nexport TARGET_OSSL_LIBRARY_PATH=/path/to/openssl/lib\nmake\n\nThe performance testing apps must be run ensuring that libcrypto.so and\nlibssl.so are on the library path.\n\nFor example:\n\nLD_LIBRARY_PATH=/path/to/openssl/lib ./randbytes 10\n\nEach performance testing app will take different parameters. They are described\nindividually below. All performance testing apps take the \"--terse\" option\nwhich has the affect of just printing bare performance numbers without any\nlabels.\n\nrandbytes\n---------\n\nThe randbytes test does 10000 calls of the RAND_bytes() function divided\nevenly among multiple threads. The number of threads to use is provided as\nan argument and the test reports the average time take to execute a block of\n1000 RAND_bytes() calls.\n\nhandshake\n---------\n\nPerforms a combined in-memory client and server handshake. In total 100000\nhandshakes are performed divided evenly among each thread. It take 2 optional\nand two required arguments:\nhandshake [-t] [-s] \u003ccertsdir\u003e \u003cthreadcount\u003e\n-t - produce terse output\n-s - create an ssl_ctx per connection, rather than a single thread-shared ctx\ncertsdir - Directory where the test can locate servercert.pem and serverkey.pem\nthreadcount - Number of concurrent threads to run in test\n\nThe output is two values: the average time taken for a single handshake in us,\nand the average number of simultaneous handshakes per second performed over the\ncourse of the test.\n\nsslnew\n------\n\nThe sslnew test repeatedly constructs a new SSL object and associates it with a\nnewly constructed read BIO and a newly constructed write BIO, and finally frees\nthem again. It does 100000 repetitions divided evenly among each thread.\nThe number of threads to use is provided as an argument and the test\nreports the average time taken to execute a block of 1000 construction/free\ncalls.\n\nnewrawkey\n---------\n\nThe newrawkey test repeatedly calls the EVP_PKEY_new_raw_public_key_ex()\nfunction. It does 100000 repetitions divided evenly among each thread. The\nnumber of threads to use is provided as an argument and the test reports the\naverage time take to execute a block of 1000 EVP_PKEY_new_raw_public_key_ex()\ncalls.\n\nNote that this test does not support OpenSSL 1.1.1.\n\nrsasign\n-------\n\nThe rsasign test repeatedly calls the EVP_PKEY_sign_init()/EVP_PKEY_sign()\nfunctions, using a 512 bit RSA key. It does 100000 repetitions divided evenly\namong each thread. The number of threads to use is provided as an argument and\nthe test reports the average time take to execute a block of 1000\nEVP_PKEY_sign_init()/EVP_PKEY_sign() calls.\n\nx509storeissuer\n---------------\n\nRuns the function call X509_STORE_CTX_get1_issuer() repeatedly in a loop (which\nis used in certificate chain building as part of a verify operation). The test\nassumes that the default certificates directly exists but is empty. For a\ndefault configuration this is \"/usr/local/ssl/certs\". The test takes the number\nof threads to use as an argument and the test reports the average time take to\nexecute a block of 1000 X509_STORE_CTX_get1_issuer() calls.\n\nproviderdoall\n-------------\n\nThe providerdoall test repeatedly calls the OSSL_PROVIDER_do_all() function.\nIt does 100000 repetitions divided evenly among each thread. The number of\nthreads to use is provided as an argument and the test reports the average time\ntake to execute a block of 1000 OSSL_PROVIDER_do_all() calls.\n\nrwlocks\n-------------\nthe rwlocks test creates the command line specified number of threads, splitting\nthem evenly between read and write functions (though this is adjustable via the\nLOCK_WRITERS environment variable).  Threads then iteratively acquire a shared\nrwlock to read or update some shared data.  The number of read and write\nlock/unlock pairs are reported as a performance measurement\n\npkeyread\n--------\n\nThe pkeyread test repeatedly calls the PEM_read_bio_PrivateKey() function on a\nmemory BIO with a private key of desired type, when it is running in pem mode\n(-f pem).  If test is running in der mode (-f der) it calls to\nd2i_PrivateKey_ex() function to repeatedly read private key of desired type.\nIt does 10000 repetitions divided evenly among each thread. The number of\nthreads to use is provided by option -t. The test reports average time per\ncall. Use option -k to select key type for benchmark.  The list of keys for\ntesting is as follows: dh, dhx, dsa, ec, rsa, xkey.  To run benchmark for all\nkeys and formats using 4 threads run pkeyread as follows:\n    ./pkeyread -f all -k all -t 4\n\nevp_setpeer\n-------\n\nThe evp_setpeer test repeatedly calls the EVP_PKEY_derive_set_peer() function\non a memory BIO with a private key of desired type.  It does 10000\nrepetitions divided evenly among each thread. The last argument will be the\nnumber of threads run. The test reports average time per call. Use option -k\nto select key type for benchmark.  The list of keys for testing is as follows:\ndh, ec256, ec521, x25519.  To run benchmark for all keys using 4 threads, run\nevp_setpeer as follows:\n    ./evp_setpeer -k all -t 4\n\nwriteread\n---------\n\nPerforms an in-memory client and server handshake and measures the average\ntime taken for a single sequence of calling SSL_write_ex() on the client and\nSSL_read_ex() on the server.  In total 1000000 writes and reads are performed\ndivided evenly among each thread. It take 4 optional and 2 required arguments:\nwriteread [-t] [-s] [-d] [-b size] \u003ccertsdir\u003e \u003cthreadcount\u003e\n-t - produce terse output.\n-s - create an ssl_ctx per connection, rather than a single thread-shared ctx.\n-d - use DTLS as connection method.\n-b - size of buffer to write and read, default is 1024 bytes.\ncertsdir - directory where the test can locate servercert.pem and serverkey.pem.\nthreadcount - number of concurrent threads to run in test.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenssl%2Fperftools","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopenssl%2Fperftools","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenssl%2Fperftools/lists"}