forked from tindy2013/stairspeedtest-reborn
-
Notifications
You must be signed in to change notification settings - Fork 0
/
perf_test.h
33 lines (30 loc) · 909 Bytes
/
perf_test.h
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
#ifndef PERF_TEST_H_INCLUDED
#define PERF_TEST_H_INCLUDED
#include "socket.h"
#include "misc.h"
struct nodePerfInfo
{
int linkType = -1;
int id = 0;
int groupID = 0;
bool online = false;
std::string group;
std::string remarks;
std::string server;
int port = 0;
std::string proxyStr;
std::string pkLoss = "100.00%";
int rawPing[6] = {};
std::string avgPing = "0.00";
int rawSitePing[3] = {};
std::string sitePing = "0.00";
int rawTelegramPing[3] = {};
std::string telegramPing = "0.00";
int rawCloudflarePing[3] = {};
std::string cloudflarePing = "0.00";
geoIPInfo inboundGeoIP;
geoIPInfo outboundGeoIP;
};
void testTelegram(std::string localaddr, int localport, nodePerfInfo *node);
void testCloudflare(std::string localaddr, int localport, nodePerfInfo *node);
#endif // PERF_TEST_H_INCLUDED