-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathWorker.h
More file actions
45 lines (29 loc) · 726 Bytes
/
Worker.h
File metadata and controls
45 lines (29 loc) · 726 Bytes
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
39
40
41
42
43
44
45
//
// Created by Kosho Owa on 2016/08/19.
//
#ifndef ESPERF_WORKER_H
#define ESPERF_WORKER_H
#include <iostream>
#include <curl/curl.h>
#include <random>
#include <sstream>
#include <thread>
#include "Options.h"
#include "Stats.h"
using namespace std;
class Worker {
public:
Worker(Stats *stats, Options *options);
Worker(Stats *stats_, Options *options_, mutex *mtx_for_cout_);
void Run();
private:
Stats *stats_;
Options *options_;
mutex *mtx_for_cout_;
string ReplaceRNUM(const string in);
string ReplaceRNUMEx(const string in);
string ReplaceRDICT(const string in);
void safe_cout(const string msg);
void safe_cerr(const string msg);
};
#endif //ESPERF_WORKER_H