diff options
author | Christian Klinger | 2016-07-15 10:11:04 +0200 |
---|---|---|
committer | Christian Klinger | 2016-07-15 10:11:04 +0200 |
commit | b747910584c2eac6fd4c4c9835016c491c01f531 (patch) | |
tree | 0970c97c9d45953401672e045a549171de41de65 /src/bench/connection.h | |
parent | [SERVER] Bump debug lock tracking limits (diff) | |
download | dnbd3-b747910584c2eac6fd4c4c9835016c491c01f531.tar.gz dnbd3-b747910584c2eac6fd4c4c9835016c491c01f531.tar.xz dnbd3-b747910584c2eac6fd4c4c9835016c491c01f531.zip |
Added rudimentary benchmark tool.
Diffstat (limited to 'src/bench/connection.h')
-rw-r--r-- | src/bench/connection.h | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/src/bench/connection.h b/src/bench/connection.h new file mode 100644 index 0000000..9cb59ef --- /dev/null +++ b/src/bench/connection.h @@ -0,0 +1,26 @@ +#ifndef _CONNECTION_H_ +#define _CONNECTION_H_ + +#include "../shared/fdsignal.h" +#include <stdbool.h> +#include <stdint.h> +#include "helper.h" + +struct _dnbd3_async; + +typedef struct _dnbd3_async { + struct _dnbd3_async *next; // Next in this linked list (provate field, not set by caller) + char* buffer; // Caller-provided buffer to be filled + uint64_t offset; + uint32_t length; + dnbd3_signal_t* signal; // Used to signal the caller + bool finished; // Will be set to true if the request has been handled + bool success; // Will be set to true if the request succeeded +} dnbd3_async_t; + + +bool connection_init_n_times(const char *hosts, const char *image, const uint16_t rid, int ntimes, BenchCounters* counters, bool closeSockets); + +bool connection_init(const char *hosts, const char *image, const uint16_t rid); + +#endif /* CONNECTION_H_ */ |