1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-21 15:04:11 -05:00
denoland-deno/tests
Divy Srivastava c7153838ec
fix(ext/node): implement TCP.setNoDelay (#26263)
Fixes https://github.com/denoland/deno/issues/26177

The significant delay was caused by Nagel's algorithm + delayed ACKs in
Linux kernels. Here's the [kernel
patch](https://lwn.net/Articles/502585/) which added 40ms
`tcp_default_delack_min`

```
$ deno run -A pg-bench.mjs # main
Tue Oct 15 2024 12:27:22 GMT+0530 (India Standard Time): 42ms

$ target/release/deno run -A pg-bench.mjs # this patch
Tue Oct 15 2024 12:28:02 GMT+0530 (India Standard Time): 1ms
```

```js
import { Buffer } from "node:buffer";

import pg from 'pg'
const { Client } = pg
const client = new Client({
    connectionString: 'postgresql://postgres:postgres@127.0.0.1:5432/postgres'
})
await client.connect()

async function fetch() {
    const startPerf = performance.now();
    const res = await client.query(`select
        $1::int as int,
        $2 as string,
        $3::timestamp with time zone as timestamp,
        $4 as null,
        $5::bool as boolean,
        $6::bytea as bytea,
        $7::jsonb as json
      `, [
        1337,
        'wat',
        new Date().toISOString(),
        null,
        false,
        Buffer.from('awesome'),
        JSON.stringify([{ some: 'json' }, { array: 'object' }])
    ])
    console.log(`${new Date()}: ${Math.round(performance.now() - startPerf)}ms`)
}

for(;;) await fetch();
```
2024-10-15 14:47:12 +05:30
..
config chore: use @std prefix for internal module specifiers (#24543) 2024-07-25 10:26:54 +10:00
ffi feat: suggest deno install --entrypoint instead of deno cache (#25228) 2024-09-18 19:55:50 +00:00
integration fix(console/ext/repl): support using parseFloat() (#25900) 2024-10-14 15:04:18 -07:00
napi fix(ext/napi): pass user context to napi_threadsafe_fn finalizers (#26229) 2024-10-14 12:41:34 +05:30
node_compat fix(ext/node): implement TCP.setNoDelay (#26263) 2024-10-15 14:47:12 +05:30
registry feat(npm): support --allow-scripts on deno run (and deno add, deno test, etc) (#26075) 2024-10-12 12:14:32 -07:00
specs fix: do not panic running remote cjs module (#26259) 2024-10-15 03:57:31 +00:00
testdata fix: do not panic running remote cjs module (#26259) 2024-10-15 03:57:31 +00:00
unit fix(console/ext/repl): support using parseFloat() (#25900) 2024-10-14 15:04:18 -07:00
unit_node fix(ext/node): compute pem length (upper bound) for key exports (#26231) 2024-10-14 14:24:26 +05:30
util chore: update std submodule (#25595) 2024-09-12 22:32:09 +10:00
wpt fix: disable same-origin.html WPT (#26067) 2024-10-08 06:15:28 -07:00
Cargo.toml feat: improve lockfile v4 to store normalized version constraints and be more terse (#25247) 2024-08-28 14:17:47 -04:00
lib.rs chore: move cli/tests/ -> tests/ (#22369) 2024-02-10 20:22:13 +00:00
README.md chore: continue tests/ re-org (#22396) 2024-02-12 17:13:14 -07:00

Deno Integration Tests