Skip to content

Commit c8dbf00

Browse files
committed
fix: bench connection failure on mac
1 parent 896e86f commit c8dbf00

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

benches/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@ import fs from 'fs';
44
import path from 'path';
55
import si from 'systeminformation';
66
import Stream1KB from './stream_1KB';
7-
import Dummy from './dummy';
7+
// import Dummy from './dummy';
88

99
async function main(): Promise<void> {
1010
await fs.promises.mkdir(path.join(__dirname, 'results'), { recursive: true });
1111
// Running benches
1212
await Stream1KB();
13-
await Dummy();
13+
// await Dummy();
1414
const resultFilenames = await fs.promises.readdir(
1515
path.join(__dirname, 'results'),
1616
);

benches/stream_1KB.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ async function main() {
2626
};
2727

2828
const data1KiB = Buffer.alloc(1024, 0xf0);
29-
const host = '::ffff:127.0.0.1' as Host;
29+
const host = '127.0.0.1' as Host;
3030
const certChainPem = await fs.promises.readFile(
3131
path.resolve(path.join(__dirname), '../tests/fixtures/certs/rsa1.crt'),
3232
);
@@ -79,11 +79,13 @@ async function main() {
7979
},
8080
host,
8181
port: quicServer.port,
82+
localHost: host,
8283
crypto,
8384
logger,
8485
});
86+
8587
// Running benchmark
86-
const summary = b.suite(
88+
const summary = await b.suite(
8789
path.basename(__filename, path.extname(__filename)),
8890
b.add('send 1Kib of data', async () => {
8991
const stream = await client.connection.streamNew();
@@ -103,11 +105,9 @@ async function main() {
103105
]);
104106
}),
105107
...suiteCommon,
106-
b.complete(async () => {
107-
await quicServer.stop({ force: true });
108-
await client.destroy({ force: true });
109-
}),
110108
);
109+
await quicServer.stop({ force: true });
110+
await client.destroy({ force: true });
111111
return summary;
112112
}
113113

0 commit comments

Comments
 (0)