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/helper.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/helper.h')
-rw-r--r-- | src/bench/helper.h | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/src/bench/helper.h b/src/bench/helper.h new file mode 100644 index 0000000..8342a79 --- /dev/null +++ b/src/bench/helper.h @@ -0,0 +1,38 @@ +#ifndef IMAGEHELPER_H +#define IMAGEHELPER_H + +#include "../types.h" + +#include <netdb.h> +#include <stdbool.h> +#include <stdint.h> +#include <string.h> +#include <sys/socket.h> + +typedef struct log_info { + uint64_t imageSize; + uint64_t receivedBytes; + uint64_t imageBlockCount; + uint8_t *blockRequestCount; +} log_info; + + +typedef struct BenchCounters { + int attempts; + int success; + int fails; +} BenchCounters; + + +typedef struct BenchThreadData { + BenchCounters* counter; + char* server_address; + char * image_name; + int runs; + int threadNumber; + bool closeSockets; +} BenchThreadData; + + + +#endif |