forked from TheLastTech/SneakerBot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathProxyExampleTest.js
45 lines (37 loc) · 1.21 KB
/
ProxyExampleTest.js
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
let SiteProxyTester = require("./ProxyTest");
const {
performance,
PerformanceObserver
} = require('perf_hooks');
let Proxies = [{
host: '192.126.161.203', // host
port: 3128, // port
//proxyAuth: 'user:password' // authentication if necessary.
}, {
host: '192.126.161.203', // host
port: 3128, // port
//proxyAuth: 'user:password' // authentication if necessary.
}];
let SitetoTest = "https://www.deadstock.ca";
let Tests = [];
let Test1 = async () => {
const obs = new PerformanceObserver((list, observer) => {
var Entries = list.getEntries();
for (var i = 0; i < Entries.length; i++) {
console.log(JSON.stringify((Entries[i])))
}
});
obs.observe({entryTypes: ['mark', 'measure']});
performance.clearMarks();
performance.clearMeasures();
for (var i = 0; i < Proxies.length; i++) {
let SiteProxyTest = new SiteProxyTester(SitetoTest, Proxies[i], Proxies[i].host + ":" + Proxies[i].port);
Tests.push(SiteProxyTest.Test());
}
await Promise.all(Tests);
};
(async () => {
console.log("------------------------------")
console.log("--------Starting Test 1-------")
await Test1();
})();