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(testing-mongoose): update mongodb-memory-server version #2627

Draft
wants to merge 1 commit into
base: production
Choose a base branch
from

Conversation

abenerd
Copy link
Contributor

@abenerd abenerd commented Mar 15, 2024

Information

Type Breaking change
Feature No

Our direct interaction with the package is minimal and the things we do interact with are not impacted by any breaking changes as far as I could see.

Todos

  • Tests
  • Coverage
  • Example
  • Documentation

@abenerd abenerd force-pushed the feat/update-mongodb-memory-server-version branch 2 times, most recently from 1f927fc to 791bacd Compare March 15, 2024 09:52
@abenerd abenerd marked this pull request as draft March 15, 2024 10:00
@abenerd abenerd force-pushed the feat/update-mongodb-memory-server-version branch from 791bacd to 705fc33 Compare March 18, 2024 06:13
@tsedio tsedio deleted a comment from github-actions bot Mar 18, 2024
@abenerd abenerd force-pushed the feat/update-mongodb-memory-server-version branch 2 times, most recently from 18c9d50 to 55e7a69 Compare March 26, 2024 08:02
Copy link

Benchmarks

  • Machine: linux x64 | 4 vCPUs | 15.6GB Mem
  • Node: v18.19.1
  • Run: Tue Mar 26 2024 08:14:17 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 34162.9 28.72 6.09
tsed-koa 7.67.0 12084.7 82.01 10.23
express 4.18.1 10467.2 94.69 1.87
nest 8.4.3 10214.2 97.05 2.45
express-injector 4.18.1 9611.0 103.07 2.19
tsed-express 7.67.0 8453.8 117.29 1.55
express-morgan 4.18.1 5692.0 173.84 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 ;)

@abenerd abenerd force-pushed the feat/update-mongodb-memory-server-version branch from 55e7a69 to af9df88 Compare March 26, 2024 09:23
@tsedio tsedio deleted a comment from github-actions bot Mar 26, 2024
@tsedio tsedio deleted a comment from github-actions bot Mar 26, 2024
@tsedio tsedio deleted a comment from github-actions bot Mar 26, 2024
Copy link

Benchmarks

  • Machine: linux x64 | 4 vCPUs | 15.6GB Mem
  • Node: v18.19.1
  • Run: Tue Mar 26 2024 09:42: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
koa 2.13.4 34040.8 28.84 6.07
tsed-koa 7.67.0 11794.4 84.03 9.99
express 4.18.1 10269.6 96.55 1.83
nest 8.4.3 9985.6 99.24 2.40
express-injector 4.18.1 9703.5 101.94 2.21
tsed-express 7.67.0 8664.8 114.28 1.59
express-morgan 4.18.1 5627.2 175.91 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
Copy link
Collaborator

Romakita commented May 8, 2024

Hello @abenerd
updating the mongodb-memory-server version seems to broke the CI. There is something I can do to help you ?

@abenerd
Copy link
Contributor Author

abenerd commented May 9, 2024

Yeah, I saw that, I had some issues running the tests locally, as the mongoose tests also failed for me on production, so I had issues differentiating between the errors. And later did also not have the bandwidth to continue working on this, so this stalled on my side.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants