mirror of
https://git.libssh.org/projects/libssh.git
synced 2025-07-31 00:03:07 +03:00
Add benchmark code for upload using the async sftp aio api
benchmarks_async_sftp_aio_up() has been added in tests/benchmarks/bench_sftp.c to obtain the performance metrics of a upload using the low level async sftp aio api. Signed-off-by: Eshan Kelkar <eshankelkar@galorithm.com> Reviewed-by: Sahana Prasad <sahana@redhat.com> Reviewed-by: Jakub Jelen <jjelen@redhat.com>
This commit is contained in:
committed by
Sahana Prasad
parent
710ce11cf0
commit
f4fe781f65
@ -70,6 +70,11 @@ struct benchmark benchmarks[] = {
|
||||
.name = "benchmark_async_sftp_aio_download",
|
||||
.fct = benchmarks_async_sftp_aio_down,
|
||||
.enabled = 0
|
||||
},
|
||||
{
|
||||
.name = "benchmark_async_sftp_aio_upload",
|
||||
.fct = benchmarks_async_sftp_aio_up,
|
||||
.enabled = 0
|
||||
}
|
||||
#endif /* WITH_SFTP */
|
||||
};
|
||||
@ -160,6 +165,14 @@ static struct argp_option options[] = {
|
||||
.doc = "Download data using asynchronous SFTP AIO api (fast)",
|
||||
.group = 0
|
||||
},
|
||||
{
|
||||
.name = "async-sftp-aio-upload",
|
||||
.key = '9',
|
||||
.arg = NULL,
|
||||
.flags = 0,
|
||||
.doc = "Upload data using asynchronous SFTP AIO api (fast)",
|
||||
.group = 0
|
||||
},
|
||||
{
|
||||
.name = "host",
|
||||
.key = 'h',
|
||||
@ -224,6 +237,7 @@ static error_t parse_opt (int key, char *arg, struct argp_state *state)
|
||||
case '6':
|
||||
case '7':
|
||||
case '8':
|
||||
case '9':
|
||||
benchmarks[key - '1'].enabled = 1;
|
||||
arguments->ntests++;
|
||||
break;
|
||||
|
Reference in New Issue
Block a user