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(schema): fix OASv3 schema generation fails when model used in @OneOf has kind property #2424

Merged
merged 1 commit into from
Sep 3, 2023

Conversation

Romakita
Copy link
Collaborator

@Romakita Romakita commented Sep 3, 2023

Closes: #2413

@github-actions
Copy link

github-actions bot commented Sep 3, 2023

Benchmarks

  • Machine: linux x64 | 2 vCPUs | 6.8GB Mem
  • Node: v16.20.2
  • Run: Sun Sep 03 2023 08:39:21 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 45097.6 21.73 8.04
nest-fastify 8.4.3 40092.0 24.47 7.15
koa 2.13.4 32915.2 29.83 5.87
fastify-injector 3.29.4 23022.9 42.90 5.25
express 4.18.1 8800.6 112.66 1.57
tsed-koa 7.34.7 8219.8 120.67 7.18
nest 8.4.3 7621.2 130.19 1.83
fastify-big-json 3.29.4 7499.2 132.15 86.26
express-injector 4.18.1 6916.9 143.23 1.58
tsed-express 7.34.7 6382.8 155.31 1.17
express-morgan 4.18.1 5117.5 193.47 0.91

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 ;)

@github-actions
Copy link

github-actions bot commented Sep 3, 2023

Benchmarks

  • Machine: linux x64 | 2 vCPUs | 6.8GB Mem
  • Node: v16.20.2
  • Run: Sun Sep 03 2023 08:43: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.4 45033.6 21.73 8.03
nest-fastify 8.4.3 41356.8 23.78 7.37
koa 2.13.4 36112.8 27.21 6.44
fastify-injector 3.29.4 23753.6 41.60 5.41
express 4.18.1 9060.6 109.45 1.62
tsed-koa 7.34.7 7987.1 124.18 6.98
fastify-big-json 3.29.4 7960.4 124.67 91.59
nest 8.4.3 7685.0 129.04 1.85
express-injector 4.18.1 7189.2 137.99 1.64
tsed-express 7.34.7 6630.4 149.46 1.21
express-morgan 4.18.1 5171.4 191.66 0.92

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 1628958 into production Sep 3, 2023
36 checks passed
@Romakita Romakita deleted the fix-2413-one-of-king-issue branch September 3, 2023 09:44
@Romakita
Copy link
Collaborator Author

Romakita commented Sep 3, 2023

🎉 This PR is included in version 7.34.8 🎉

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.

[BUG] OASv3 schema generation fails when model used in @OneOf has kind property
1 participant