Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(di): fix issue when pushing logs after request end #2423

Merged
merged 1 commit into from
Sep 2, 2023

Conversation

Romakita
Copy link
Collaborator

@Romakita Romakita commented Sep 2, 2023

@LorianeE Fix your issue ;)

@Romakita Romakita merged commit 7e26465 into production Sep 2, 2023
33 of 34 checks passed
@Romakita Romakita deleted the fix-logger-after-flush branch September 2, 2023 12:01
@github-actions
Copy link

github-actions bot commented Sep 2, 2023

Benchmarks

  • Machine: linux x64 | 2 vCPUs | 6.8GB Mem
  • Node: v16.20.2
  • Run: Sat Sep 02 2023 12:03:41 GMT+0000 (Coordinated Universal Time)
  • Method: autocannon -c 100 -d 10 -p 10 localhost:3000 (two rounds; one to warm-up, one to measure)
Version Router Requests/s Latency Throughput/Mb
fastify 3.29.4 59612.8 16.32 10.63
nest-fastify 8.4.3 50678.4 19.26 9.04
koa 2.13.4 42740.0 22.89 7.62
fastify-injector 3.29.4 29819.2 33.00 6.80
express 4.18.1 11609.1 85.32 2.07
fastify-big-json 3.29.4 11095.2 89.43 127.65
nest 8.4.3 10351.2 95.94 2.49
tsed-koa 7.34.6 10260.2 96.56 8.96
express-injector 4.18.1 9662.0 102.61 2.20
tsed-express 7.34.6 8599.4 115.08 1.57
express-morgan 4.18.1 6923.8 142.63 1.23

Explanation

The benchmark shows a performance difference between the frameworks. We note that Ts.ED is often last. In fact, Ts.ED uses features useful to a production application which reduce its performance.

For example, Ts.ED initializes a sandbox (async_hook) for each request in order to work in an isolated context if necessary.
It also initializes the elements necessary for monitoring requests in a log manager.

All this at a necessary cost that reflects the reality of a production application ;)

@Romakita
Copy link
Collaborator Author

Romakita commented Sep 2, 2023

🎉 This PR is included in version 7.34.7 🎉

The release is available on:

Your semantic-release bot 📦🚀

@Romakita
Copy link
Collaborator Author

Romakita commented Sep 6, 2023

🎉 This PR is included in version 7.35.0-beta.5 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant