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(testing-mongoose): update method used to create a mocked database #2444

Merged
merged 1 commit into from
Sep 26, 2023

Conversation

Romakita
Copy link
Collaborator

No description provided.

@Romakita Romakita merged commit 450eca9 into production Sep 26, 2023
16 of 31 checks passed
@Romakita Romakita deleted the fix-testing-mongoose branch September 26, 2023 11:42
@github-actions
Copy link

Benchmarks

  • Machine: linux x64 | 2 vCPUs | 6.8GB Mem
  • Node: v16.20.2
  • Run: Tue Sep 26 2023 11:55:38 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 45513.6 21.57 8.12
nest-fastify 8.4.3 40364.8 24.31 7.20
koa 2.13.4 33347.2 29.49 5.95
fastify-injector 3.29.4 22441.6 44.02 5.12
express 4.18.1 8665.8 114.52 1.55
tsed-koa 7.36.1 7859.8 126.07 6.87
fastify-big-json 3.29.4 7417.2 133.57 85.33
nest 8.4.3 7396.4 134.01 1.78
express-injector 4.18.1 6866.8 144.46 1.56
tsed-express 7.36.1 6325.6 156.69 1.16
express-morgan 4.18.1 5034.7 196.50 0.90

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

🎉 This PR is included in version 7.36.2 🎉

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
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant