summaryrefslogtreecommitdiffstats
path: root/src/bench/helper.h
blob: 8342a7963019216691167b1e5e66b270e9050fcd (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
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