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 nullable decorator and mixed type usage #2747

Merged
merged 1 commit into from
Jul 10, 2024

Conversation

Romakita
Copy link
Collaborator

@Romakita Romakita commented Jul 8, 2024

Information

Closes: #2735

Type Breaking change
Fix No

Todos

  • Tests
  • Coverage
  • Example
  • Documentation

Copy link

github-actions bot commented Jul 8, 2024

Benchmarks

  • Machine: linux x64 | 4 vCPUs | 15.6GB Mem
  • Node: v18.20.3
  • Run: Mon Jul 08 2024 11:09:46 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
koa 2.13.4 33820.0 29.05 6.03
tsed-koa 7.75.0 12199.6 81.19 10.33
express 4.19.2 10594.4 93.42 1.89
express-injector 4.19.2 9902.4 100.07 2.26
nest 8.4.3 9706.7 102.16 2.33
tsed-express 7.75.0 8703.8 114.01 1.59
express-morgan 4.19.2 5698.0 173.74 1.02
fastify-big-json 3.29.4 N/A N/A N/A
fastify-injector 3.29.4 N/A N/A N/A
fastify 3.29.4 N/A N/A N/A
nest-fastify 8.4.3 N/A N/A N/A

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 force-pushed the fix-2735-nullable-union-type branch 2 times, most recently from f106f09 to 447c1a4 Compare July 8, 2024 14:54
Copy link

github-actions bot commented Jul 8, 2024

Benchmarks

  • Machine: linux x64 | 4 vCPUs | 15.6GB Mem
  • Node: v18.20.3
  • Run: Mon Jul 08 2024 15:02:04 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
koa 2.13.4 33420.4 29.40 5.96
tsed-koa 7.75.0 11558.2 85.73 9.79
express 4.19.2 10379.2 95.45 1.85
nest 8.4.3 9806.9 101.09 2.36
express-injector 4.19.2 9180.5 107.83 2.09
tsed-express 7.75.0 8324.2 119.12 1.52
express-morgan 4.19.2 5517.3 179.25 0.98
fastify-big-json 3.29.4 N/A N/A N/A
fastify-injector 3.29.4 N/A N/A N/A
fastify 3.29.4 N/A N/A N/A
nest-fastify 8.4.3 N/A N/A N/A

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

Copy link

github-actions bot commented Jul 8, 2024

Benchmarks

  • Machine: linux x64 | 4 vCPUs | 15.6GB Mem
  • Node: v18.20.3
  • Run: Mon Jul 08 2024 15:05:28 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
koa 2.13.4 32785.5 29.97 5.85
tsed-koa 7.75.0 12049.1 82.24 10.20
express 4.19.2 10380.0 95.54 1.85
nest 8.4.3 9927.8 99.86 2.39
express-injector 4.19.2 9391.0 105.57 2.14
tsed-express 7.75.0 8738.4 113.39 1.60
express-morgan 4.19.2 5570.0 177.62 0.99
fastify-big-json 3.29.4 N/A N/A N/A
fastify-injector 3.29.4 N/A N/A N/A
fastify 3.29.4 N/A N/A N/A
nest-fastify 8.4.3 N/A N/A N/A

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 force-pushed the fix-2735-nullable-union-type branch 2 times, most recently from 07ced45 to 8e14123 Compare July 8, 2024 15:37
Copy link

github-actions bot commented Jul 8, 2024

Benchmarks

  • Machine: linux x64 | 4 vCPUs | 15.6GB Mem
  • Node: v18.20.3
  • Run: Mon Jul 08 2024 15:40:42 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
koa 2.13.4 33665.6 29.19 6.00
tsed-koa 7.75.1 11988.7 82.67 10.15
express 4.19.2 10902.9 90.93 1.94
express-injector 4.19.2 9648.9 102.65 2.20
nest 8.4.3 9545.0 103.82 2.29
tsed-express 7.75.1 8272.4 119.55 1.51
express-morgan 4.19.2 5679.1 174.34 1.01
fastify-big-json 3.29.4 N/A N/A N/A
fastify-injector 3.29.4 N/A N/A N/A
fastify 3.29.4 N/A N/A N/A
nest-fastify 8.4.3 N/A N/A N/A

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

Copy link

github-actions bot commented Jul 8, 2024

Benchmarks

  • Machine: linux x64 | 4 vCPUs | 15.6GB Mem
  • Node: v18.20.3
  • Run: Mon Jul 08 2024 15:48:30 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
koa 2.13.4 32720.7 30.02 5.84
tsed-koa 7.75.1 11438.9 86.63 9.69
express 4.19.2 10388.2 95.44 1.85
express-injector 4.19.2 9643.3 102.74 2.20
nest 8.4.3 9602.7 103.19 2.31
tsed-express 7.75.1 8404.4 117.80 1.54
express-morgan 4.19.2 5619.1 176.09 1.00
fastify-big-json 3.29.4 N/A N/A N/A
fastify-injector 3.29.4 N/A N/A N/A
fastify 3.29.4 N/A N/A N/A
nest-fastify 8.4.3 N/A N/A N/A

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 force-pushed the fix-2735-nullable-union-type branch from 8e14123 to e3a1258 Compare July 9, 2024 07:03
Copy link

github-actions bot commented Jul 9, 2024

Benchmarks

  • Machine: linux x64 | 4 vCPUs | 15.6GB Mem
  • Node: v18.20.3
  • Run: Tue Jul 09 2024 07:14:50 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
koa 2.13.4 32848.0 29.92 5.86
tsed-koa 7.75.2 11637.5 85.13 9.86
express 4.19.2 10152.5 97.67 1.81
nest 8.4.3 9837.6 100.70 2.36
express-injector 4.19.2 9662.9 102.41 2.20
tsed-express 7.75.2 8588.0 115.47 1.57
express-morgan 4.19.2 5551.1 178.32 0.99
fastify-big-json 3.29.4 N/A N/A N/A
fastify-injector 3.29.4 N/A N/A N/A
fastify 3.29.4 N/A N/A N/A
nest-fastify 8.4.3 N/A N/A N/A

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 force-pushed the fix-2735-nullable-union-type branch from e3a1258 to 82de0ff Compare July 9, 2024 08:01
Copy link

github-actions bot commented Jul 9, 2024

Benchmarks

  • Machine: linux x64 | 4 vCPUs | 15.6GB Mem
  • Node: v18.20.3
  • Run: Tue Jul 09 2024 08:12:16 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
koa 2.13.4 31609.6 31.08 5.64
tsed-koa 7.75.2 11404.0 86.92 9.66
express 4.19.2 10062.2 98.30 1.79
nest 8.4.3 9697.8 102.23 2.33
express-injector 4.19.2 9460.9 104.79 2.16
tsed-express 7.75.2 8313.3 119.15 1.52
express-morgan 4.19.2 5364.6 184.58 0.96
fastify-big-json 3.29.4 N/A N/A N/A
fastify-injector 3.29.4 N/A N/A N/A
fastify 3.29.4 N/A N/A N/A
nest-fastify 8.4.3 N/A N/A N/A

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 ce892ee into production Jul 10, 2024
15 checks passed
@Romakita Romakita deleted the fix-2735-nullable-union-type branch July 10, 2024 12:45
@Romakita
Copy link
Collaborator Author

🎉 This PR is included in version 7.75.4 🎉

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.

[BUG] @Nullable decorator does not work with unions of various objects
1 participant