Skip to content

Commit 31983c8

Browse files
committed
test: add benchmark test for quic
The benchmarks under benchmark/quic were not exercised by any test, so changes to node:quic could silently break them. Add a benchmark test that runs them when QUIC is available, and trigger the QUIC workflow when the benchmarks or their test change. Signed-off-by: Soul Lee <alus20x@gmail.com>
1 parent 9c06dab commit 31983c8

2 files changed

Lines changed: 16 additions & 0 deletions

File tree

‎.github/workflows/test-linux-quic.yml‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ on:
55
pull_request:
66
paths:
77
- .github/workflows/test-linux-quic.yml
8+
- benchmark/quic/**
89
- configure.py
910
- node.gyp
1011
- node.gypi
@@ -18,6 +19,7 @@ on:
1819
- lib/internal/quic/**
1920
- lib/stream/iter.js
2021
- lib/internal/streams/iter/**
22+
- test/benchmark/test-benchmark-quic.js
2123
- test/cctest/test_quic_*
2224
- test/common/quic*
2325
- test/common/quic/**
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
// Flags: --experimental-quic --no-warnings
2+
'use strict';
3+
4+
const common = require('../common');
5+
6+
if (!common.hasQuic)
7+
common.skip('missing quic');
8+
9+
if (!common.enoughTestMem)
10+
common.skip('Insufficient memory for QUIC benchmark test');
11+
12+
const runBenchmark = require('../common/benchmark');
13+
14+
runBenchmark('quic', { NODEJS_BENCHMARK_ZERO_ALLOWED: 1 });

0 commit comments

Comments
 (0)