You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
11 lines
280 B
11 lines
280 B
|
4 years ago
|
import fetch from 'node-fetch';
|
||
|
|
(async () => {
|
||
|
|
let iterations = 1000;
|
||
|
|
let start = new Date().valueOf();
|
||
|
|
for (let i = 0; i < iterations; i++) {
|
||
|
|
await fetch('http://localhost:3333/events/');
|
||
|
|
}
|
||
|
|
let end = new Date().valueOf();
|
||
|
|
console.log((end - start) / 1000);
|
||
|
|
})();
|