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(swagger): use getAbsolutePath from swagger-ui-dist/get-absolute-path.js #2698

Merged
merged 1 commit into from
May 7, 2024

Conversation

Romakita
Copy link
Collaborator

@Romakita Romakita commented May 7, 2024

Closes: #2695

Information

Type Breaking change
Fix No

Todos

  • Tests
  • Coverage
  • Example
  • Documentation

@Romakita Romakita force-pushed the fix-2965-swagger-ui-dist-path-again branch from e09e00b to 864d16f Compare May 7, 2024 08:19
Copy link

github-actions bot commented May 7, 2024

Benchmarks

  • Machine: linux x64 | 4 vCPUs | 15.6GB Mem
  • Node: v18.20.2
  • Run: Tue May 07 2024 08:29:59 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 33065.6 29.72 5.90
tsed-koa 7.68.5 11548.0 85.74 9.78
express 4.19.2 10508.7 94.32 1.87
nest 8.4.3 9808.2 101.13 2.36
express-injector 4.19.2 9468.2 104.71 2.16
tsed-express 7.68.5 8893.6 111.36 1.63
express-morgan 4.19.2 5539.5 178.70 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 ;)

Copy link

github-actions bot commented May 7, 2024

Benchmarks

  • Machine: linux x64 | 4 vCPUs | 15.6GB Mem
  • Node: v18.20.2
  • Run: Tue May 07 2024 08:31:07 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 33892.8 28.98 6.05
tsed-koa 7.68.5 11996.0 82.59 10.16
express 4.19.2 10001.6 99.07 1.78
nest 8.4.3 9824.9 100.89 2.36
express-injector 4.19.2 9702.9 101.99 2.21
tsed-express 7.68.5 8915.5 111.17 1.63
express-morgan 4.19.2 5637.3 175.65 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 ;)

@Romakita Romakita merged commit 77a1b6c into production May 7, 2024
15 checks passed
@Romakita Romakita deleted the fix-2965-swagger-ui-dist-path-again branch May 7, 2024 09:31
@Romakita
Copy link
Collaborator Author

Romakita commented May 7, 2024

🎉 This PR is included in version 7.68.6 🎉

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] Swagger issue on loading an undefined resource
1 participant