cmorten / opine

Minimalist web framework for Deno ported from ExpressJS.
https://github.com/cmorten/opine/blob/main/.github/API/api.md
MIT License
854 stars 43 forks source link

upgrade to support deno v1.14.0 #142

Closed twilson63 closed 3 years ago

twilson63 commented 3 years ago

Issue

breaking changes with Deno v1.14.0

Details

Updated setCookie function to pass response.headers instead of response Updated dep.ts file to export from http/server_legacy.ts

CheckList

github-actions[bot] commented 3 years ago

Benchmark results

PR to merge main aa2d0e85b8047475339724e82467fe37b8e2b9f8 -> main ```console opine: 1 middleware ================================ 1 middleware Running 3s test @ http://localhost:3333/?foo[bar]=baz 2 threads and 10 connections Thread Stats Avg Stdev Max +/- Stdev Latency 2.73ms 795.97us 19.60ms 90.69% Req/Sec 1.84k 295.54 2.13k 85.94% Latency Distribution 50% 2.44ms 75% 2.80ms 90% 3.43ms 99% 6.11ms 11791 requests in 3.22s, 1.71MB read Requests/sec: 3667.24 Transfer/sec: 544.36KB opine: 10 middleware ================================ 10 middleware Running 3s test @ http://localhost:3333/?foo[bar]=baz 2 threads and 10 connections Thread Stats Avg Stdev Max +/- Stdev Latency 2.83ms 0.87ms 19.58ms 90.00% Req/Sec 1.78k 334.64 2.10k 78.12% Latency Distribution 50% 2.46ms 75% 3.02ms 90% 3.69ms 99% 6.28ms 11432 requests in 3.22s, 1.66MB read Requests/sec: 3547.04 Transfer/sec: 526.51KB opine: 50 middleware ================================ 50 middleware Running 3s test @ http://localhost:3333/?foo[bar]=baz 2 threads and 10 connections Thread Stats Avg Stdev Max +/- Stdev Latency 3.27ms 0.93ms 26.22ms 91.47% Req/Sec 1.54k 242.29 1.76k 87.10% Latency Distribution 50% 2.92ms 75% 3.39ms 90% 3.99ms 99% 6.71ms 9556 requests in 3.12s, 1.39MB read Requests/sec: 3059.74 Transfer/sec: 454.18KB native_http benchmark ================================ Server listening on localhost:3333 Running 3s test @ http://localhost:3333/?foo[bar]=baz 2 threads and 10 connections Thread Stats Avg Stdev Max +/- Stdev Latency 478.11us 141.26us 4.58ms 94.31% Req/Sec 10.46k 0.97k 11.18k 90.32% Latency Distribution 50% 444.00us 75% 464.00us 90% 523.00us 99% 1.14ms 64607 requests in 3.10s, 5.36MB read Requests/sec: 20842.51 Transfer/sec: 1.73MB std/http benchmark ================================ Server listening on localhost:3333 Running 3s test @ http://localhost:3333/?foo[bar]=baz 2 threads and 10 connections Thread Stats Avg Stdev Max +/- Stdev Latency 440.76us 119.01us 3.99ms 94.63% Req/Sec 11.36k 1.02k 12.06k 90.00% Latency Distribution 50% 415.00us 75% 428.00us 90% 460.00us 99% 0.99ms 67815 requests in 3.00s, 5.63MB read Requests/sec: 22605.33 Transfer/sec: 1.88MB deno_http_native benchmark ================================ Server listening on localhost:3333 Running 3s test @ http://localhost:3333/?foo[bar]=baz 2 threads and 10 connections Thread Stats Avg Stdev Max +/- Stdev Latency 442.96us 124.88us 3.73ms 94.82% Req/Sec 11.31k 0.95k 11.89k 93.33% Latency Distribution 50% 419.00us 75% 432.00us 90% 464.00us 99% 0.97ms 67567 requests in 3.00s, 5.61MB read Requests/sec: 22521.23 Transfer/sec: 1.87MB ```