fix report file

This commit is contained in:
Urko 2023-04-10 20:26:39 +02:00
parent e8db5a0e64
commit 84e8ea1ff9
1 changed files with 5 additions and 5 deletions

View File

@ -50,11 +50,11 @@ For this test Ive decided to make 1 AMS API request for 1 employee for 1 mont
**nest** **nest**
Ive made a jest test: first test is to fetch database. We can see it takes around **10850ms** Ive made a jest test: first test is to fetch database. We can see it takes around **10850ms**
![startup](./assets/3.png) ![startup](./assets/3.png)
![startup](./assets/4.png)
**go** **go**
With go the whole process takes **2613ms** With go the whole process takes **2613ms**
![startup](./assets/4.png) ![startup](./assets/5.png)
### AMS direct request ### AMS direct request
@ -63,20 +63,20 @@ I didnt go further with this comparison as Ive seen direct request to SITA
## Process 1000 request sent at same time ## Process 1000 request sent at same time
Ive created a go project that is responsible to send 1000 request at same time and wait until last response is sent by server to calculate how much time server took to handle 1000 requests at same time for GET operation. Well, in NestJS case it was POST itself because it is graphql but is a request to retrieve data. Ive added an operation to write each response into a log file to more or less simulate a real request from a browser client. Ive created a go project that is responsible to send 1000 request at same time and wait until last response is sent by server to calculate how much time server took to handle 1000 requests at same time for GET operation. Well, in NestJS case it was POST itself because it is graphql but is a request to retrieve data. Ive added an operation to write each response into a log file to more or less simulate a real request from a browser client.
![startup](./assets/5.png)
![startup](./assets/6.png)
As we can see go server served using fiber framework takes **2874ms** to handle 1000 requests. As we can see go server served using fiber framework takes **2874ms** to handle 1000 requests.
NestJS graphql took 40612ms to handle all requests. There is a huge difference: **go** is **14.13** times faster `40612/2874` than NestJS+Grahpql NestJS graphql took 40612ms to handle all requests. There is a huge difference: **go** is **14.13** times faster `40612/2874` than NestJS+Grahpql
Testing each one isolated we can see that: Testing each one isolated we can see that:
**nest** takes **16417ms** to handle 1000 requests **nest** takes **16417ms** to handle 1000 requests
![startup](./assets/6.png)
`go` takes 1410ms to handle 1000 requests this means go is 11.64 times faster than nest handling requests **go** takes 1410ms to handle 1000 requests this means go is 11.64 times faster than nest handling requests