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

build: use @swc-node/jest #863

Closed
wants to merge 1 commit into from
Closed

build: use @swc-node/jest #863

wants to merge 1 commit into from

Conversation

saihaj
Copy link
Collaborator

@saihaj saihaj commented Oct 22, 2021

swap ts-jest with @swc-node/jest speeds up tests.

Locally on my machine

Before After
image

@changeset-bot
Copy link

changeset-bot bot commented Oct 22, 2021

⚠️ No Changeset found

Latest commit: 3f01e6a

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@vercel
Copy link

vercel bot commented Oct 22, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/theguild/envelop/5vcRRdGqxWjaUiuZQt3XEVUrvcWE
✅ Preview: https://envelop-git-use-swc-theguild.vercel.app

@theguild-bot
Copy link
Collaborator

theguild-bot commented Oct 22, 2021

The latest changes of this PR are not available as alpha, since there are no linked changesets for this PR.

@theguild-bot
Copy link
Collaborator

✅ Benchmark Results

     ✓ no_errors
     ✓ expected_result

     checks.............................................: 100.00% ✓ 129750      ✗ 0    
     data_received......................................: 501 MB  10 MB/s
     data_sent..........................................: 28 MB   566 kB/s
     envelop_init.......................................: avg=1.81µs   min=400ns    med=900ns   max=8.57ms  p(90)=3µs      p(95)=3.5µs   
     ✓ { mode:envelop-cache-jit }.......................: avg=813ns    min=400ns    med=800ns   max=35µs    p(90)=1.1µs    p(95)=1.2µs   
     ✓ { mode:envelop-just-cache }......................: avg=957ns    min=400ns    med=900ns   max=134.2µs p(90)=1.2µs    p(95)=1.3µs   
     ✓ { mode:graphql-js }..............................: avg=2.51µs   min=400ns    med=1.2µs   max=5.81ms  p(90)=3.1µs    p(95)=3.6µs   
     ✓ { mode:prom-tracing }............................: avg=7.78µs   min=2.4µs    med=3.4µs   max=8.57ms  p(90)=10.7µs   p(95)=11.1µs  
     envelop_total......................................: avg=360.19µs min=0s       med=146.7µs max=16.66ms p(90)=581.76µs p(95)=1.72ms  
     ✓ { mode:envelop-cache-jit }.......................: avg=144.81µs min=107.1µs  med=133.4µs max=11.44ms p(90)=154.9µs  p(95)=169.18µs
     ✓ { mode:envelop-just-cache }......................: avg=420.95µs min=294.5µs  med=364.3µs max=12.45ms p(90)=403.12µs p(95)=482.73µs
     ✓ { mode:graphql-js }..............................: avg=581.6µs  min=439.6µs  med=503.7µs max=16.66ms p(90)=608.7µs  p(95)=829.75µs
     ✓ { mode:prom-tracing }............................: avg=1.9ms    min=1.4ms    med=1.74ms  max=15.5ms  p(90)=2.1ms    p(95)=3.22ms  
     event_loop_lag.....................................: avg=0s       min=0s       med=0s      max=0s      p(90)=0s       p(95)=0s      
     ✓ { mode:envelop-cache-and-no-internal-tracing }...: avg=0s       min=0s       med=0s      max=0s      p(90)=0s       p(95)=0s      
     ✓ { mode:envelop-cache-jit }.......................: avg=0s       min=0s       med=0s      max=0s      p(90)=0s       p(95)=0s      
     ✓ { mode:envelop-just-cache }......................: avg=0s       min=0s       med=0s      max=0s      p(90)=0s       p(95)=0s      
     ✓ { mode:graphql-js }..............................: avg=0s       min=0s       med=0s      max=0s      p(90)=0s       p(95)=0s      
     ✓ { mode:prom-tracing }............................: avg=0s       min=0s       med=0s      max=0s      p(90)=0s       p(95)=0s      
     graphql_context....................................: avg=3.71µs   min=1.4µs    med=2.7µs   max=6.99ms  p(90)=6.3µs    p(95)=7.2µs   
     ✓ { mode:envelop-cache-jit }.......................: avg=2.61µs   min=1.4µs    med=2.2µs   max=6.99ms  p(90)=2.7µs    p(95)=2.9µs   
     ✓ { mode:envelop-just-cache }......................: avg=3.01µs   min=1.9µs    med=2.8µs   max=1.23ms  p(90)=3.2µs    p(95)=3.4µs   
     ✓ { mode:graphql-js }..............................: avg=4.99µs   min=2.2µs    med=3.6µs   max=1.26ms  p(90)=5.5µs    p(95)=8.9µs   
     ✓ { mode:prom-tracing }............................: avg=8.34µs   min=5.3µs    med=6.9µs   max=1.23ms  p(90)=9.7µs    p(95)=10.2µs  
     graphql_execute....................................: avg=379.09µs min=71.8µs   med=312.5µs max=14.06ms p(90)=1.13ms   p(95)=1.63ms  
     ✓ { mode:envelop-cache-jit }.......................: avg=100.32µs min=71.8µs   med=91.2µs  max=10.18ms p(90)=106.4µs  p(95)=116.7µs 
     ✓ { mode:envelop-just-cache }......................: avg=371.24µs min=260µs    med=320.1µs max=12.41ms p(90)=347.3µs  p(95)=407.53µs
     ✓ { mode:graphql-js }..............................: avg=372.24µs min=290.9µs  med=326µs   max=11.88ms p(90)=366.3µs  p(95)=415.46µs
     ✓ { mode:prom-tracing }............................: avg=1.79ms   min=1.32ms   med=1.63ms  max=14.06ms p(90)=1.84ms   p(95)=3.11ms  
     graphql_parse......................................: avg=13.32µs  min=3.4µs    med=5.6µs   max=9.41ms  p(90)=31.3µs   p(95)=45.2µs  
     ✓ { mode:envelop-cache-jit }.......................: avg=6.43µs   min=3.8µs    med=5.4µs   max=2.11ms  p(90)=8.8µs    p(95)=9.5µs   
     ✓ { mode:envelop-just-cache }......................: avg=7.07µs   min=3.4µs    med=4.8µs   max=9.41ms  p(90)=5.92µs   p(95)=14.5µs  
     ✓ { mode:graphql-js }..............................: avg=19.93µs  min=8.5µs    med=15.8µs  max=3.7ms   p(90)=24.6µs   p(95)=31.2µs  
     ✓ { mode:prom-tracing }............................: avg=51.64µs  min=33.7µs   med=45.6µs  max=3.76ms  p(90)=59.94µs  p(95)=69.03µs 
     graphql_validate...................................: avg=66.16µs  min=25.5µs   med=34.85µs max=14.11ms p(90)=154.4µs  p(95)=169.4µs 
     ✓ { mode:envelop-cache-jit }.......................: avg=34.62µs  min=25.5µs   med=33µs    max=1.4ms   p(90)=38.9µs   p(95)=42.1µs  
     ✓ { mode:envelop-just-cache }......................: avg=38.65µs  min=26.7µs   med=34.4µs  max=5.8ms   p(90)=43.7µs   p(95)=49.8µs  
     ✓ { mode:graphql-js }..............................: avg=181.91µs min=134.2µs  med=154.3µs max=14.11ms p(90)=200.52µs p(95)=228.8µs 
     ✓ { mode:prom-tracing }............................: avg=48.3µs   min=32.4µs   med=42.4µs  max=9.22ms  p(90)=48.9µs   p(95)=55.32µs 
     http_req_blocked...................................: avg=6.33µs   min=900ns    med=1.8µs   max=17.92ms p(90)=2.7µs    p(95)=3.4µs   
     http_req_connecting................................: avg=3.44µs   min=0s       med=0s      max=17.63ms p(90)=0s       p(95)=0s      
     http_req_duration..................................: avg=7.17ms   min=323.7µs  med=5.41ms  max=82.93ms p(90)=15.54ms  p(95)=19.05ms 
       { expected_response:true }.......................: avg=7.17ms   min=323.7µs  med=5.41ms  max=82.93ms p(90)=15.54ms  p(95)=19.05ms 
     ✓ { mode:envelop-cache-and-no-internal-tracing }...: avg=6.44ms   min=699.8µs  med=5.09ms  max=54.42ms p(90)=10.73ms  p(95)=12.24ms 
     ✓ { mode:envelop-cache-jit }.......................: avg=3.9ms    min=323.7µs  med=2.71ms  max=32.73ms p(90)=9.58ms   p(95)=12.08ms 
     ✓ { mode:envelop-just-cache }......................: avg=6.83ms   min=673.6µs  med=5.57ms  max=50.46ms p(90)=11.28ms  p(95)=13.53ms 
     ✓ { mode:graphql-js }..............................: avg=9.45ms   min=922.01µs med=7.39ms  max=68.51ms p(90)=15.33ms  p(95)=19.13ms 
     ✓ { mode:prom-tracing }............................: avg=21.66ms  min=3.47ms   med=19ms    max=82.93ms p(90)=36.3ms   p(95)=38.25ms 
     http_req_failed....................................: 0.00%   ✓ 0           ✗ 64875
     http_req_receiving.................................: avg=62.87µs  min=14.9µs   med=28.1µs  max=46.21ms p(90)=43.2µs   p(95)=50.2µs  
     http_req_sending...................................: avg=70.4µs   min=6µs      med=11.2µs  max=33.5ms  p(90)=24.8µs   p(95)=31.1µs  
     http_req_tls_handshaking...........................: avg=0s       min=0s       med=0s      max=0s      p(90)=0s       p(95)=0s      
     http_req_waiting...................................: avg=7.04ms   min=299.9µs  med=5.31ms  max=82.85ms p(90)=15.16ms  p(95)=18.95ms 
     http_reqs..........................................: 64875   1297.273267/s
     iteration_duration.................................: avg=7.7ms    min=556.9µs  med=5.86ms  max=83.35ms p(90)=16.45ms  p(95)=19.57ms 
     iterations.........................................: 64875   1297.273267/s
     vus................................................: 10      min=8         max=10 
     vus_max............................................: 40      min=40        max=40 

Copy link
Collaborator

@PabloSzx PabloSzx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

works great, the prometheus tests are now by far the bottleneck in the tests now, in 2 seconds I have all the tests done, but prometheus takes 10 seconds

@saihaj
Copy link
Collaborator Author

saihaj commented Oct 23, 2021

Closing in favor of #864 since it improves many things

@saihaj saihaj closed this Oct 23, 2021
@saihaj saihaj deleted the use-swc branch October 23, 2021 14:20
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.

4 participants