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

feat(prisma): add Type support for mongo BDD #2175

Conversation

Romakita
Copy link
Collaborator

@Romakita Romakita commented Nov 25, 2022

Closes: #2135

@github-actions
Copy link

Benchmarks

  • Machine: linux x64 | 2 vCPUs | 6.8GB Mem
  • Node: v16.18.1
  • Run: Fri Nov 25 2022 15:03:54 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.1 51772.8 18.88 9.23
nest-fastify 8.4.3 47302.4 20.71 8.43
koa 2.13.4 38424.8 25.61 6.85
fastify-injector 3.29.1 23443.2 42.12 5.34
express 4.18.1 10445.4 95.06 1.86
fastify-big-json 3.29.1 9204.2 107.52 105.90
tsed-koa 7.6.0 9053.6 109.47 7.91
nest 8.4.3 8885.0 111.66 2.14
express-injector 4.18.1 8156.0 121.48 1.86
tsed-express 7.6.0 7176.0 138.12 1.31
express-morgan 4.18.1 5988.0 165.48 1.07

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 Romakita merged commit d50da74 into production Nov 25, 2022
@Romakita Romakita deleted the 2135-feat-tsedprisma-should-create-classes-for-prisma-type-definitions branch November 25, 2022 15:17
@Romakita
Copy link
Collaborator Author

🎉 This PR is included in version 7.7.0 🎉

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.

[FEAT] @tsed/prisma should create classes for prisma type definitions
1 participant