You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
test(loadtest): run against in-repo SDK and match HTTP/2-as-default
Update the SDK load harness for the new default transport:
- `loadtest.ts` imports `../src/sdk.ts` (like the sibling loadtest scripts) so
it always exercises the SDK code in this checkout, not a published build.
- Set `http2` explicitly: HTTP/2 is now the default, so HTTP/1.1 must be opted
into with `http2: false`. `USE_HTTP2` defaults to on; `USE_HTTP2=0` benchmarks
HTTP/1.1. Relabel the HTTP/2 mode as native `node:http2`.
- Drop the `@runloop/api-client` file dependency and `type: module` from
`loadtest/package.json` (the latter would force the shared loadtest dir to ESM
and break `push-to-loki.ts`); keep `undici` so the raw undici-vs-native
comparison still runs — that comparison motivated the native H2 transport.
- Document the real-API comparison scripts (SDK + raw undici/node:http2/https)
in the loadtest README.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|`loadtest.ts`| The **SDK** itself. `USE_HTTP2=0` → HTTP/1.1 (`node-fetch`); default / `USE_HTTP2=1` → HTTP/2 (native `node:http2`). Imports `../src/sdk.ts`, so it always runs against the SDK code in this checkout. |
30
+
|`undici-test.ts`, `undici-single-conn.ts`, `undici-debug.ts`| Raw [undici](https://github.com/nodejs/undici) HTTP/2 pool, bypassing the SDK. |
31
+
|`h2-test.ts`, `h2-single-conn.ts`| Raw `node:http2`, bypassing the SDK. |
32
+
|`raw-fetch-test.ts`| Raw `node:https` (HTTP/1.1 keep-alive agent). |
33
+
|`alpn-check.ts`| Confirms the origin negotiates `h2` via TLS ALPN. |
34
+
35
+
The raw-transport probes compare undici's HTTP/2 multiplexing against `node:http2`
36
+
(and HTTP/1.1) directly — the comparison that motivated building the SDK's own
37
+
`node:http2` transport. They're kept so that comparison stays reproducible.
38
+
39
+
```sh
40
+
# SDK: HTTP/2 (default) vs HTTP/1.1, 2000-request burst
0 commit comments