perf: downsized test data, increased SSH socket buffer, and made chunk size configurable
- Reduced test data from 50MB to 25MB (test.py) - Increased SSH socketpair buffer to 1MB via setsockopt (transport_ssh.c) - Made chunk size configurable: new Config field, --chunk-size CLI flag, sent over wire, and used in scanner instead of DESIRED_CHUNK_SIZE - Fixed DESIRED_CHUNK_SIZE macro parentheses (chunk.h)
This commit is contained in:
@@ -55,6 +55,12 @@ Client *client_connect_ssh(char *destination) {
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
int buf_size = 1024 * 1024;
|
||||
setsockopt(sv[0], SOL_SOCKET, SO_SNDBUF, &buf_size, sizeof(buf_size));
|
||||
setsockopt(sv[0], SOL_SOCKET, SO_RCVBUF, &buf_size, sizeof(buf_size));
|
||||
setsockopt(sv[1], SOL_SOCKET, SO_SNDBUF, &buf_size, sizeof(buf_size));
|
||||
setsockopt(sv[1], SOL_SOCKET, SO_RCVBUF, &buf_size, sizeof(buf_size));
|
||||
|
||||
int exec_pipe[2];
|
||||
if (pipe(exec_pipe) < 0) {
|
||||
perror("pipe failed");
|
||||
|
||||
Reference in New Issue
Block a user