diff options
-rw-r--r-- | packages/bun-landing/pages/index.tsx | 126 | ||||
-rw-r--r-- | packages/bun-landing/styles/global.css | 8 |
2 files changed, 67 insertions, 67 deletions
diff --git a/packages/bun-landing/pages/index.tsx b/packages/bun-landing/pages/index.tsx index bb8b0b811..44099931a 100644 --- a/packages/bun-landing/pages/index.tsx +++ b/packages/bun-landing/pages/index.tsx @@ -224,24 +224,24 @@ export default function LandingPage() { Bun.serve </button> <button - data-tab="sqlite" - id="tab-sqlite" - aria-controls="sqlite-tab-content" + data-tab="websocket" + id="tab-websocket" + aria-controls="websocket-tab-content" className="Tab" role="tab" tabIndex={-1} > - bun:sqlite + WebSocket </button> <button - data-tab="ffi" - id="tab-ffi" - aria-controls="ffi-tab-content" + data-tab="sqlite" + id="tab-sqlite" + aria-controls="sqlite-tab-content" className="Tab" role="tab" tabIndex={-1} > - bun:ffi + bun:sqlite </button> </div> <div id="active-tab" className="ActiveTab"> @@ -256,7 +256,7 @@ export default function LandingPage() { Server-side rendering React </h2> <p className="BarGraph-subheading"> - HTTP requests per second (Linux AMD64) + HTTP requests per second (Linux x64) </p> <ul style={{ "--count": 3 }} className="BarGraphList"> @@ -302,57 +302,51 @@ export default function LandingPage() { <div role="tabpanel" tabIndex={-1} - id="sqlite-tab-content" - aria-labelledby="tab-sqlite" - className="BarGraph--sqlite BarGraph BarGraph--horizontal BarGraph--dark" + id="websocket-tab-content" + aria-labelledby="tab-websocket" + className="BarGraph BarGraph--websocket BarGraph--horizontal BarGraph--dark" > - <h2 className="BarGraph-heading">Load a huge table</h2> + <h2 className="BarGraph-heading">WebSocket chat server</h2> <p className="BarGraph-subheading"> - Average queries per second + Messages sent per second (Linux x64, 16 clients) </p> <ul style={{ "--count": 3 }} className="BarGraphList"> <BarGraphItem type="bun" - amount={(1000 / 14.22).toFixed(2)} - label="queries per second" - max={Math.ceil( - Math.max(1000 / 14.22, 1000 / 42.96, 1000 / 27.37) * 1.25 - )} + amount={(737280).toFixed(2)} + label="messages sent per second" + max={Math.ceil(Math.max(737280, 107457, 82097) * 1.25)} /> <BarGraphItem - type="deno" - amount={(1000 / 27.37).toFixed(2)} - label="queries per second" - max={Math.ceil( - Math.max(1000 / 14.22, 1000 / 42.96, 1000 / 27.37) * 1.25 - )} + type="node" + amount={(107457).toFixed(2)} + label="messages sent per second" + max={Math.ceil(Math.max(737280, 107457, 82097) * 1.25)} /> <BarGraphItem - type="better-sqlite3" - amount={(1000 / 42.96).toFixed(2)} - label="queries per second" - max={Math.ceil( - Math.max(1000 / 14.22, 1000 / 42.96, 1000 / 27.37) * 1.25 - )} + type="deno" + amount={(82097).toFixed(2)} + label="messages sent per second" + max={Math.ceil(Math.max(737280, 107457, 82097) * 1.25)} /> </ul> <div style={{ "--count": 3 }} className="BarGraphKey"> <BarGraphLabel - name="bun:sqlite" - version="v0.2.0" - source="https://github.com/oven-sh/bun/blob/b0a7f8df926e91d3b2f0b3b8833ddaf55073f30e/bench/sqlite/bun.js#L9" + name="Bun.serve()" + version="v0.2.1" + source="https://github.com/oven-sh/bun/blob/9c7eb75a9ac845d92bfdfd6cc574dc8f39bde293/bench/websocket-server/chat-server.bun.js#L1" /> <BarGraphLabel - name="deno (x/sqlite)" - version="v1.26.1" - source="https://github.com/oven-sh/bun/blob/e55d6eed2bf9a5db30250fdd8b9be063dc949054/bench/sqlite/deno.js" + name="ws (Node.js)" + version="node v18.10.0" + source="https://github.com/oven-sh/bun/blob/9c7eb75a9ac845d92bfdfd6cc574dc8f39bde293/bench/websocket-server/chat-server.node.mjs#L1" /> <BarGraphLabel - name="better-sqlite3" - source="https://github.com/oven-sh/bun/blob/e55d6eed2bf9a5db30250fdd8b9be063dc949054/bench/sqlite/node.mjs" - version="node v18.2.0" + name="Deno.serve()" + source="https://github.com/oven-sh/bun/blob/9c7eb75a9ac845d92bfdfd6cc574dc8f39bde293/bench/websocket-server/chat-server.deno.mjs#L1" + version="v1.26.2" /> </div> </div> @@ -360,50 +354,56 @@ export default function LandingPage() { <div role="tabpanel" tabIndex={-1} - id="ffi-tab-content" - aria-labelledby="tab-ffi" - className="BarGraph BarGraph--ffi BarGraph--horizontal BarGraph--dark" + id="sqlite-tab-content" + aria-labelledby="tab-sqlite" + className="BarGraph--sqlite BarGraph BarGraph--horizontal BarGraph--dark" > - <h2 className="BarGraph-heading"> - How fast can it get? (Hashing) - </h2> - <p className="BarGraph-subheading">Operations per second</p> + <h2 className="BarGraph-heading">Load a huge table</h2> + <p className="BarGraph-subheading"> + Average queries per second + </p> <ul style={{ "--count": 3 }} className="BarGraphList"> <BarGraphItem type="bun" - amount={(17434000).toFixed(2)} - label="operations per second" - max={Math.ceil(Math.max(17434000, 6870963, 7563000) * 1.25)} + amount={(1000 / 14.22).toFixed(2)} + label="queries per second" + max={Math.ceil( + Math.max(1000 / 14.22, 1000 / 42.96, 1000 / 27.37) * 1.25 + )} /> <BarGraphItem type="deno" - amount={(7563000).toFixed(2)} - label="operations per iteration" - max={Math.ceil(Math.max(17434000, 6870963, 7563000) * 1.25)} + amount={(1000 / 27.37).toFixed(2)} + label="queries per second" + max={Math.ceil( + Math.max(1000 / 14.22, 1000 / 42.96, 1000 / 27.37) * 1.25 + )} /> <BarGraphItem - type="Node-API" - amount={(6870963).toFixed(2)} - label="operations per second" - max={Math.ceil(Math.max(17434000, 6870963, 7563000) * 1.25)} + type="better-sqlite3" + amount={(1000 / 42.96).toFixed(2)} + label="queries per second" + max={Math.ceil( + Math.max(1000 / 14.22, 1000 / 42.96, 1000 / 27.37) * 1.25 + )} /> </ul> <div style={{ "--count": 3 }} className="BarGraphKey"> <BarGraphLabel - name="bun:ffi" + name="bun:sqlite" version="v0.2.0" - source="https://github.com/oven-sh/bun/blob/cbc1e407c3aad3d396ab60317fc24b94341dfb45/bench/ffi/bun.js" + source="https://github.com/oven-sh/bun/blob/b0a7f8df926e91d3b2f0b3b8833ddaf55073f30e/bench/sqlite/bun.js#L9" /> <BarGraphLabel - name="deno (ffi)" + name="deno (x/sqlite3)" version="v1.26.1" - source="https://github.com/oven-sh/bun/blob/af033c02c5fbaade201abfe332f376879d9e6885/bench/ffi/deno.js" + source="https://github.com/oven-sh/bun/blob/6223030360c121e272aad98c7d1c14a009c5fc1c/bench/sqlite/deno.js#L9" /> <BarGraphLabel - name="node (napi)" - source="https://github.com/oven-sh/bun/blob/cbc1e407c3aad3d396ab60317fc24b94341dfb45/bench/ffi/node.mjs" + name="better-sqlite3" + source="https://github.com/oven-sh/bun/blob/e55d6eed2bf9a5db30250fdd8b9be063dc949054/bench/sqlite/node.mjs" version="node v18.2.0" /> </div> diff --git a/packages/bun-landing/styles/global.css b/packages/bun-landing/styles/global.css index 6646891d2..fecf91fa6 100644 --- a/packages/bun-landing/styles/global.css +++ b/packages/bun-landing/styles/global.css @@ -316,7 +316,7 @@ header { .Tab:hover, .Graphs--active-react .Tab[data-tab="react"], .Graphs--active-sqlite .Tab[data-tab="sqlite"], -.Graphs--active-ffi .Tab[data-tab="ffi"] { +.Graphs--active-websocket .Tab[data-tab="websocket"] { border-bottom-color: aquamarine; background-color: rgba(130, 216, 247, 0.1); border-right-color: aquamarine; @@ -750,13 +750,13 @@ header { } .BarGraph--react, -.BarGraph--ffi, +.BarGraph--websocket, .BarGraph--sqlite { display: none; } .Graphs--active-react .BarGraph--react, -.Graphs--active-ffi .BarGraph--ffi, +.Graphs--active-websocket .BarGraph--websocket, .Graphs--active-sqlite .BarGraph--sqlite { display: block; } @@ -851,7 +851,7 @@ header { .Graphs--active-react .Tab[data-tab="react"], .Graphs--active-sqlite .Tab[data-tab="sqlite"], - .Graphs--active-ffi .Tab[data-tab="ffi"] { + .Graphs--active-websocket .Tab[data-tab="websocket"] { background-color: rgba(100, 100, 100, 0.1); } } |