From b747910584c2eac6fd4c4c9835016c491c01f531 Mon Sep 17 00:00:00 2001 From: Christian Klinger Date: Fri, 15 Jul 2016 10:11:04 +0200 Subject: Added rudimentary benchmark tool. --- src/bench/helper.h | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 src/bench/helper.h (limited to 'src/bench/helper.h') 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 +#include +#include +#include +#include + +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 -- cgit v1.2.3-55-g7522