Skip to content

Commit e126bca

Browse files
committed
feat(js): add pure TypeScript entry point and comprehensive unit test suite
- Add js/pure/index.ts exposing generate, analyzeCoverage, extendTests, and estimateModel backed entirely by the TS engine (no WASM required) - Add js/pure/adapter.ts converting between public API types and internal TS engine types (toInternalParams, toPublicResult, toPublicCoverageReport, etc.) - Add js/types.ts as a dedicated public type module; refactor js/index.ts to re-export from it instead of duplicating declarations - Add package.json exports entry for "./pure" pointing to dist/js/pure/index.js - Add js/compat.test.ts verifying WASM and pure TS engines produce identical coverage, stats, and tuple counts across 14 scenarios - Add unit tests for all TS engine modules: algo/greedy, core/coverage-engine, core/generator, integration, model/constraint-ast, model/error, model/generate-options, model/parameter, model/test-case, util/bitset, util/combinatorics, util/rng, util/string_util, validator/constraint-validator, validator/coverage-validator - Update benchmark tables in all READMEs and docs to show WASM vs Pure TS timing columns; add high-strength (5-wise / 6-wise) stress test results - Fix js/index.ts WASM module import path for vitest alias resolution
1 parent a3b228a commit e126bca

32 files changed

Lines changed: 4885 additions & 229 deletions

README.md

Lines changed: 58 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
[![codecov](https://codecov.io/gh/libraz/coverwise/branch/main/graph/badge.svg)](https://codecov.io/gh/libraz/coverwise)
55
[![License](https://img.shields.io/badge/license-Apache%202.0-blue)](https://github.com/libraz/coverwise/blob/main/LICENSE)
66
[![C++17](https://img.shields.io/badge/C%2B%2B-17-blue?logo=c%2B%2B)](https://en.cppreference.com/w/cpp/17)
7+
[![TypeScript](https://img.shields.io/badge/TypeScript-5-blue?logo=typescript)](https://www.typescriptlang.org/)
78
[![Platform](https://img.shields.io/badge/platform-Linux%20%7C%20macOS%20%7C%20WebAssembly-lightgrey)](https://github.com/libraz/coverwise)
89

910
Combinatorial test coverage engine. Analyzes existing tests for coverage gaps, generates minimal test suites, and extends tests incrementally — in browsers, Node.js, and native C++.
@@ -85,6 +86,34 @@ const result = cw.generate({
8586
});
8687
```
8788

89+
## Pure TypeScript (no WASM)
90+
91+
A pure TypeScript build is available for environments where WASM is not supported or not needed. Same API, no async initialization required.
92+
93+
```typescript
94+
import { Coverwise } from '@libraz/coverwise/pure';
95+
96+
const cw = await Coverwise.create(); // returns immediately, no WASM loading
97+
98+
const result = cw.generate({
99+
parameters: [
100+
{ name: 'os', values: ['Windows', 'macOS', 'Linux'] },
101+
{ name: 'browser', values: ['Chrome', 'Firefox', 'Safari'] },
102+
],
103+
});
104+
105+
const report = cw.analyzeCoverage(parameters, existingTests);
106+
const extended = cw.extendTests(existingTests, { parameters });
107+
```
108+
109+
| | WASM (default) | Pure TS |
110+
|---|---|---|
111+
| Import | `@libraz/coverwise` | `@libraz/coverwise/pure` |
112+
| Initialization | `await Coverwise.create()` | `await Coverwise.create()` |
113+
| Performance | Faster (native code) | Slightly slower |
114+
| Dependencies | Requires WASM support | None |
115+
| API | Identical | Identical |
116+
88117
## CLI
89118

90119
```bash
@@ -124,29 +153,39 @@ All configurations achieve 100% t-wise coverage, verified by an independent cove
124153

125154
### Pairwise (2-wise)
126155

127-
| Configuration | Params | Values | Tuples | Tests | Theoretical Min | Time |
128-
|---------------|--------|--------|--------|-------|-----------------|------|
129-
| 5 × 3 uniform | 5 | 3 | 90 | 16 | 9 (OA) | < 1 ms |
130-
| 10 × 3 uniform | 10 | 3 | 405 | 20 | 9 (OA) | < 1 ms |
131-
| 13 × 3 uniform | 13 | 3 | 702 | 21 | 9 (OA) | < 1 ms |
132-
| 10 × 5 uniform | 10 | 5 | 1,125 | 52 | 25 | 1 ms |
133-
| 15 × 4 uniform | 15 | 4 | 1,680 | 40 | 16 | 1 ms |
134-
| 20 × 2 uniform | 20 | 2 | 760 | 12 | 4 | < 1 ms |
135-
| 20 × 5 uniform | 20 | 5 | 4,750 | 66 | 25 | 4 ms |
136-
| 30 × 5 uniform | 30 | 5 | 10,875 | 76 | 25 | 9 ms |
137-
| 50 × 3 uniform | 50 | 3 | 11,025 | 33 | 9 (OA) | 6 ms |
138-
| 5 × 20 high-card | 5 | 20 | 4,000 | 514 | 400 | 9 ms |
139-
| 3⁴ × 2³ mixed | 7 | 2–3 | 138 | 14 | 9 | < 1 ms |
140-
| 5¹ × 3³ × 2⁴ mixed | 8 | 2–5 | 208 | 19 | 15 | < 1 ms |
156+
| Configuration | Tuples | Tests | Theoretical Min | WASM | Pure TS |
157+
|---------------|--------|-------|-----------------|------|---------|
158+
| 5 × 3 uniform | 90 | 16 | 9 (OA) | < 1 ms | 1 ms |
159+
| 10 × 3 uniform | 405 | 20 | 9 (OA) | < 1 ms | 1 ms |
160+
| 13 × 3 uniform | 702 | 21 | 9 (OA) | < 1 ms | 1 ms |
161+
| 10 × 5 uniform | 1,125 | 52 | 25 | 1 ms | 1 ms |
162+
| 15 × 4 uniform | 1,680 | 40 | 16 | 1 ms | 1 ms |
163+
| 20 × 2 uniform | 760 | 12 | 4 | < 1 ms | < 1 ms |
164+
| 20 × 5 uniform | 4,750 | 66 | 25 | 4 ms | 2 ms |
165+
| 30 × 5 uniform | 10,875 | 76 | 25 | 9 ms | 5 ms |
166+
| 50 × 3 uniform | 11,025 | 33 | 9 (OA) | 6 ms | 4 ms |
167+
| 5 × 20 high-card | 4,000 | 514 | 400 | 9 ms | 4 ms |
141168

142169
### Higher strength
143170

144-
| Configuration | Params | Values | Strength | Tuples | Tests | Time |
145-
|---------------|--------|--------|----------|--------|-------|------|
146-
| 15 × 3 | 15 | 3 | 3-wise | 12,285 | 100 | 11 ms |
147-
| 8 × 3 | 8 | 3 | 4-wise | 5,670 | 236 | 8 ms |
171+
| Configuration | Strength | Tuples | Tests | WASM | Pure TS |
172+
|---------------|----------|--------|-------|------|---------|
173+
| 15 × 3 | 3-wise | 12,285 | 100 | 11 ms | 9 ms |
174+
| 8 × 3 | 4-wise | 5,670 | 236 | 8 ms | 4 ms |
175+
176+
### High strength (stress test)
177+
178+
| Configuration | Strength | Tuples | Tests | WASM | Pure TS |
179+
|---------------|----------|--------|-------|------|---------|
180+
| 10 × 3 | 5-wise | 61,236 | 885 | 16 ms | 49 ms |
181+
| 8 × 4 | 5-wise | 57,344 | 2,749 | 18 ms | 52 ms |
182+
| 12 × 3 | 6-wise | 673,596 | 3,334 | 218 ms | 789 ms |
183+
| 15 × 3 | 5-wise | 729,729 | 1,277 | 220 ms | 761 ms |
184+
| 20 × 3 | 5-wise | 3,767,472 | 1,581 | 1.4 s | 4.2 s |
185+
186+
Measured on Apple M-series (seed=42). Theoretical Min is from orthogonal array (OA) theory or v² bounds. Greedy algorithms typically produce 1.5–2.5× the theoretical minimum. WASM and Pure TS use different RNG implementations, so test counts may differ slightly.
148187

149-
Measured on Apple M-series (seed=42). Theoretical Min is from orthogonal array (OA) theory or v² bounds. Greedy algorithms typically produce 1.5–2.5× the theoretical minimum.
188+
For pairwise testing (the most common use case), WASM and Pure TS perform equally. WASM shows a ~3× advantage only in high-strength configurations with > 60,000 tuples.
150189

151190
## Build
152191

README.npm.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,15 @@ const result = cw.generate({
6565
});
6666
```
6767

68+
### Pure TypeScript (no WASM)
69+
70+
```typescript
71+
import { Coverwise } from '@libraz/coverwise/pure';
72+
73+
const cw = await Coverwise.create(); // no WASM loading, returns immediately
74+
const result = cw.generate({ parameters: [/* ... */] });
75+
```
76+
6877
### Browser (CDN)
6978

7079
```html

README_ja.md

Lines changed: 58 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
[![codecov](https://codecov.io/gh/libraz/coverwise/branch/main/graph/badge.svg)](https://codecov.io/gh/libraz/coverwise)
55
[![License](https://img.shields.io/badge/license-Apache%202.0-blue)](https://github.com/libraz/coverwise/blob/main/LICENSE)
66
[![C++17](https://img.shields.io/badge/C%2B%2B-17-blue?logo=c%2B%2B)](https://en.cppreference.com/w/cpp/17)
7+
[![TypeScript](https://img.shields.io/badge/TypeScript-5-blue?logo=typescript)](https://www.typescriptlang.org/)
78
[![Platform](https://img.shields.io/badge/platform-Linux%20%7C%20macOS%20%7C%20WebAssembly-lightgrey)](https://github.com/libraz/coverwise)
89

910
組み合わせテストカバレッジエンジン。既存テストのカバレッジギャップを分析し、最小テストスイートを生成し、差分だけを追加拡張します。ブラウザ、Node.js、ネイティブ C++ で動作。
@@ -85,6 +86,34 @@ const result = cw.generate({
8586
});
8687
```
8788

89+
## Pure TypeScript(WASMなし)
90+
91+
WASMが使えない環境や不要な場合に、純粋なTypeScript版を利用できます。APIは同一で、非同期の初期化は不要です。
92+
93+
```typescript
94+
import { Coverwise } from '@libraz/coverwise/pure';
95+
96+
const cw = await Coverwise.create(); // 即座に返る、WASMロードなし
97+
98+
const result = cw.generate({
99+
parameters: [
100+
{ name: 'os', values: ['Windows', 'macOS', 'Linux'] },
101+
{ name: 'browser', values: ['Chrome', 'Firefox', 'Safari'] },
102+
],
103+
});
104+
105+
const report = cw.analyzeCoverage(parameters, existingTests);
106+
const extended = cw.extendTests(existingTests, { parameters });
107+
```
108+
109+
| | WASM(デフォルト) | Pure TS |
110+
|---|---|---|
111+
| インポート | `@libraz/coverwise` | `@libraz/coverwise/pure` |
112+
| 初期化 | `await Coverwise.create()` | `await Coverwise.create()` |
113+
| パフォーマンス | 高速(ネイティブコード) | やや低速 |
114+
| 依存 | WASM対応が必要 | なし |
115+
| API | 同一 | 同一 |
116+
88117
## CLI
89118

90119
```bash
@@ -124,29 +153,39 @@ coverwise stats input.json
124153

125154
### ペアワイズ (2-wise)
126155

127-
| 構成 | パラメータ数 | 値の数 | タプル数 | テスト数 | 理論下限 | 時間 |
128-
|------|------------|--------|---------|---------|---------|------|
129-
| 5 × 3 均一 | 5 | 3 | 90 | 16 | 9 (OA) | < 1 ms |
130-
| 10 × 3 均一 | 10 | 3 | 405 | 20 | 9 (OA) | < 1 ms |
131-
| 13 × 3 均一 | 13 | 3 | 702 | 21 | 9 (OA) | < 1 ms |
132-
| 10 × 5 均一 | 10 | 5 | 1,125 | 52 | 25 | 1 ms |
133-
| 15 × 4 均一 | 15 | 4 | 1,680 | 40 | 16 | 1 ms |
134-
| 20 × 2 均一 | 20 | 2 | 760 | 12 | 4 | < 1 ms |
135-
| 20 × 5 均一 | 20 | 5 | 4,750 | 66 | 25 | 4 ms |
136-
| 30 × 5 均一 | 30 | 5 | 10,875 | 76 | 25 | 9 ms |
137-
| 50 × 3 均一 | 50 | 3 | 11,025 | 33 | 9 (OA) | 6 ms |
138-
| 5 × 20 高カーディナリティ | 5 | 20 | 4,000 | 514 | 400 | 9 ms |
139-
| 3⁴ × 2³ 混合 | 7 | 2–3 | 138 | 14 | 9 | < 1 ms |
140-
| 5¹ × 3³ × 2⁴ 混合 | 8 | 2–5 | 208 | 19 | 15 | < 1 ms |
156+
| 構成 | タプル数 | テスト数 | 理論下限 | WASM | Pure TS |
157+
|------|---------|---------|---------|------|---------|
158+
| 5 × 3 均一 | 90 | 16 | 9 (OA) | < 1 ms | 1 ms |
159+
| 10 × 3 均一 | 405 | 20 | 9 (OA) | < 1 ms | 1 ms |
160+
| 13 × 3 均一 | 702 | 21 | 9 (OA) | < 1 ms | 1 ms |
161+
| 10 × 5 均一 | 1,125 | 52 | 25 | 1 ms | 1 ms |
162+
| 15 × 4 均一 | 1,680 | 40 | 16 | 1 ms | 1 ms |
163+
| 20 × 2 均一 | 760 | 12 | 4 | < 1 ms | < 1 ms |
164+
| 20 × 5 均一 | 4,750 | 66 | 25 | 4 ms | 2 ms |
165+
| 30 × 5 均一 | 10,875 | 76 | 25 | 9 ms | 5 ms |
166+
| 50 × 3 均一 | 11,025 | 33 | 9 (OA) | 6 ms | 4 ms |
167+
| 5 × 20 高カーディナリティ | 4,000 | 514 | 400 | 9 ms | 4 ms |
141168

142169
### 高強度
143170

144-
| 構成 | パラメータ数 | 値の数 | 強度 | タプル数 | テスト数 | 時間 |
145-
|------|------------|--------|------|---------|---------|------|
146-
| 15 × 3 | 15 | 3 | 3-wise | 12,285 | 100 | 11 ms |
147-
| 8 × 3 | 8 | 3 | 4-wise | 5,670 | 236 | 8 ms |
171+
| 構成 | 強度 | タプル数 | テスト数 | WASM | Pure TS |
172+
|------|------|---------|---------|------|---------|
173+
| 15 × 3 | 3-wise | 12,285 | 100 | 11 ms | 9 ms |
174+
| 8 × 3 | 4-wise | 5,670 | 236 | 8 ms | 4 ms |
175+
176+
### 高強度(ストレステスト)
177+
178+
| 構成 | 強度 | タプル数 | テスト数 | WASM | Pure TS |
179+
|------|------|---------|---------|------|---------|
180+
| 10 × 3 | 5-wise | 61,236 | 885 | 16 ms | 49 ms |
181+
| 8 × 4 | 5-wise | 57,344 | 2,749 | 18 ms | 52 ms |
182+
| 12 × 3 | 6-wise | 673,596 | 3,334 | 218 ms | 789 ms |
183+
| 15 × 3 | 5-wise | 729,729 | 1,277 | 220 ms | 761 ms |
184+
| 20 × 3 | 5-wise | 3,767,472 | 1,581 | 1.4 s | 4.2 s |
185+
186+
Apple M シリーズで計測(seed=42)。理論下限は直交配列 (OA) 理論または v² 下界に基づく既知の下限値。貪欲法アルゴリズムは一般に理論最小値の 1.5〜2.5 倍のテスト数を生成します。WASM と Pure TS は異なる RNG 実装を使用するため、テスト数はわずかに異なる場合があります。
148187

149-
Apple M シリーズで計測(seed=42)。理論下限は直交配列 (OA) 理論または v² 下界に基づく既知の下限値。貪欲法アルゴリズムは一般に理論最小値の 1.5〜2.5 倍のテスト数を生成します
188+
ペアワイズ(最も一般的なユースケース)では WASM と Pure TS は同等の性能です。WASM が約3倍の優位を示すのは、60,000タプルを超える高強度構成のみです
150189

151190
## ビルド
152191

docs/en/introduction.md

Lines changed: 35 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -84,31 +84,41 @@ coverwise is built as a **test design API**, not just a generation tool:
8484

8585
All configurations achieve **100% t-wise coverage**, verified by an independent coverage validator. Test counts fall within known theoretical bounds from covering array research.
8686

87-
### Pairwise (2-wise) Generation
88-
89-
| Configuration | Params | Values | Tuples | Tests | Theoretical Min | Time |
90-
|---------------|--------|--------|--------|-------|-----------------|------|
91-
| 5 × 3 uniform | 5 | 3 | 90 | 16 | 9 (OA) | < 1 ms |
92-
| 10 × 3 uniform | 10 | 3 | 405 | 20 | 9 (OA) | < 1 ms |
93-
| 13 × 3 uniform | 13 | 3 | 702 | 21 | 9 (OA) | < 1 ms |
94-
| 10 × 5 uniform | 10 | 5 | 1,125 | 52 | 25 | 1 ms |
95-
| 15 × 4 uniform | 15 | 4 | 1,680 | 40 | 16 | 1 ms |
96-
| 20 × 2 uniform | 20 | 2 | 760 | 12 | 4 | < 1 ms |
97-
| 20 × 5 uniform | 20 | 5 | 4,750 | 66 | 25 | 4 ms |
98-
| 30 × 5 uniform | 30 | 5 | 10,875 | 76 | 25 | 9 ms |
99-
| 50 × 3 uniform | 50 | 3 | 11,025 | 33 | 9 (OA) | 6 ms |
100-
| 5 × 20 high-card | 5 | 20 | 4,000 | 514 | 400 | 9 ms |
101-
| 3⁴ × 2³ mixed | 7 | 2–3 | 138 | 14 | 9 | < 1 ms |
102-
| 5¹ × 3³ × 2⁴ mixed | 8 | 2–5 | 208 | 19 | 15 | < 1 ms |
103-
104-
### Higher-Strength Generation
105-
106-
| Configuration | Params | Values | Strength | Tuples | Tests | Time |
107-
|---------------|--------|--------|----------|--------|-------|------|
108-
| 15 × 3 | 15 | 3 | 3-wise | 12,285 | 100 | 11 ms |
109-
| 8 × 3 | 8 | 3 | 4-wise | 5,670 | 236 | 8 ms |
110-
111-
Measured on Apple M-series (seed=42). "Theoretical Min" refers to known lower bounds from orthogonal array (OA) theory or v² bounds. Greedy algorithms typically produce 1.5–2.5× the theoretical minimum — this is expected and consistent with published results for covering array generators.
87+
### Pairwise (2-wise)
88+
89+
| Configuration | Tuples | Tests | Theoretical Min | WASM | Pure TS |
90+
|---------------|--------|-------|-----------------|------|---------|
91+
| 5 × 3 uniform | 90 | 16 | 9 (OA) | < 1 ms | 1 ms |
92+
| 10 × 3 uniform | 405 | 20 | 9 (OA) | < 1 ms | 1 ms |
93+
| 13 × 3 uniform | 702 | 21 | 9 (OA) | < 1 ms | 1 ms |
94+
| 10 × 5 uniform | 1,125 | 52 | 25 | 1 ms | 1 ms |
95+
| 15 × 4 uniform | 1,680 | 40 | 16 | 1 ms | 1 ms |
96+
| 20 × 2 uniform | 760 | 12 | 4 | < 1 ms | < 1 ms |
97+
| 20 × 5 uniform | 4,750 | 66 | 25 | 4 ms | 2 ms |
98+
| 30 × 5 uniform | 10,875 | 76 | 25 | 9 ms | 5 ms |
99+
| 50 × 3 uniform | 11,025 | 33 | 9 (OA) | 6 ms | 4 ms |
100+
| 5 × 20 high-card | 4,000 | 514 | 400 | 9 ms | 4 ms |
101+
102+
### Higher strength
103+
104+
| Configuration | Strength | Tuples | Tests | WASM | Pure TS |
105+
|---------------|----------|--------|-------|------|---------|
106+
| 15 × 3 | 3-wise | 12,285 | 100 | 11 ms | 9 ms |
107+
| 8 × 3 | 4-wise | 5,670 | 236 | 8 ms | 4 ms |
108+
109+
### High strength (stress test)
110+
111+
| Configuration | Strength | Tuples | Tests | WASM | Pure TS |
112+
|---------------|----------|--------|-------|------|---------|
113+
| 10 × 3 | 5-wise | 61,236 | 885 | 16 ms | 49 ms |
114+
| 8 × 4 | 5-wise | 57,344 | 2,749 | 18 ms | 52 ms |
115+
| 12 × 3 | 6-wise | 673,596 | 3,334 | 218 ms | 789 ms |
116+
| 15 × 3 | 5-wise | 729,729 | 1,277 | 220 ms | 761 ms |
117+
| 20 × 3 | 5-wise | 3,767,472 | 1,581 | 1.4 s | 4.2 s |
118+
119+
Measured on Apple M-series (seed=42). Theoretical Min is from orthogonal array (OA) theory or v² bounds. Greedy algorithms typically produce 1.5–2.5× the theoretical minimum. WASM and Pure TS use different RNG implementations, so test counts may differ slightly.
120+
121+
For pairwise testing (the most common use case), WASM and Pure TS perform equally. WASM shows a ~3× advantage only in high-strength configurations with > 60,000 tuples.
112122

113123
## Next Steps
114124

docs/ja/introduction.md

Lines changed: 35 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -84,31 +84,41 @@ coverwise は単なる生成ツールではなく、**テスト設計API** と
8484

8585
すべての構成で **100% t-wise カバレッジ** を達成し、独立したカバレッジバリデータで検証済みです。生成テスト数はカバリングアレイ研究の既知の理論的境界内に収まっています。
8686

87-
### ペアワイズ (2-wise) 生成
88-
89-
| 構成 | パラメータ数 | 値の数 | タプル数 | テスト数 | 理論下限 | 時間 |
90-
|------|------------|--------|---------|---------|---------|------|
91-
| 5 × 3 均一 | 5 | 3 | 90 | 16 | 9 (OA) | < 1 ms |
92-
| 10 × 3 均一 | 10 | 3 | 405 | 20 | 9 (OA) | < 1 ms |
93-
| 13 × 3 均一 | 13 | 3 | 702 | 21 | 9 (OA) | < 1 ms |
94-
| 10 × 5 均一 | 10 | 5 | 1,125 | 52 | 25 | 1 ms |
95-
| 15 × 4 均一 | 15 | 4 | 1,680 | 40 | 16 | 1 ms |
96-
| 20 × 2 均一 | 20 | 2 | 760 | 12 | 4 | < 1 ms |
97-
| 20 × 5 均一 | 20 | 5 | 4,750 | 66 | 25 | 4 ms |
98-
| 30 × 5 均一 | 30 | 5 | 10,875 | 76 | 25 | 9 ms |
99-
| 50 × 3 均一 | 50 | 3 | 11,025 | 33 | 9 (OA) | 6 ms |
100-
| 5 × 20 高カーディナリティ | 5 | 20 | 4,000 | 514 | 400 | 9 ms |
101-
| 3⁴ × 2³ 混合 | 7 | 2–3 | 138 | 14 | 9 | < 1 ms |
102-
| 5¹ × 3³ × 2⁴ 混合 | 8 | 2–5 | 208 | 19 | 15 | < 1 ms |
103-
104-
### 高強度生成
105-
106-
| 構成 | パラメータ数 | 値の数 | 強度 | タプル数 | テスト数 | 時間 |
107-
|------|------------|--------|------|---------|---------|------|
108-
| 15 × 3 | 15 | 3 | 3-wise | 12,285 | 100 | 11 ms |
109-
| 8 × 3 | 8 | 3 | 4-wise | 5,670 | 236 | 8 ms |
110-
111-
Apple M シリーズで計測(seed=42)。「理論下限」は直交配列 (OA) 理論または v² 下界に基づく既知の下限値です。貪欲法アルゴリズムは一般に理論最小値の 1.5〜2.5 倍のテスト数を生成します — これはカバリングアレイ生成器の公開された研究結果と一致しています。
87+
### ペアワイズ (2-wise)
88+
89+
| 構成 | タプル数 | テスト数 | 理論下限 | WASM | Pure TS |
90+
|------|---------|---------|---------|------|---------|
91+
| 5 × 3 均一 | 90 | 16 | 9 (OA) | < 1 ms | 1 ms |
92+
| 10 × 3 均一 | 405 | 20 | 9 (OA) | < 1 ms | 1 ms |
93+
| 13 × 3 均一 | 702 | 21 | 9 (OA) | < 1 ms | 1 ms |
94+
| 10 × 5 均一 | 1,125 | 52 | 25 | 1 ms | 1 ms |
95+
| 15 × 4 均一 | 1,680 | 40 | 16 | 1 ms | 1 ms |
96+
| 20 × 2 均一 | 760 | 12 | 4 | < 1 ms | < 1 ms |
97+
| 20 × 5 均一 | 4,750 | 66 | 25 | 4 ms | 2 ms |
98+
| 30 × 5 均一 | 10,875 | 76 | 25 | 9 ms | 5 ms |
99+
| 50 × 3 均一 | 11,025 | 33 | 9 (OA) | 6 ms | 4 ms |
100+
| 5 × 20 高カーディナリティ | 4,000 | 514 | 400 | 9 ms | 4 ms |
101+
102+
### 高強度
103+
104+
| 構成 | 強度 | タプル数 | テスト数 | WASM | Pure TS |
105+
|------|------|---------|---------|------|---------|
106+
| 15 × 3 | 3-wise | 12,285 | 100 | 11 ms | 9 ms |
107+
| 8 × 3 | 4-wise | 5,670 | 236 | 8 ms | 4 ms |
108+
109+
### 高強度(ストレステスト)
110+
111+
| 構成 | 強度 | タプル数 | テスト数 | WASM | Pure TS |
112+
|------|------|---------|---------|------|---------|
113+
| 10 × 3 | 5-wise | 61,236 | 885 | 16 ms | 49 ms |
114+
| 8 × 4 | 5-wise | 57,344 | 2,749 | 18 ms | 52 ms |
115+
| 12 × 3 | 6-wise | 673,596 | 3,334 | 218 ms | 789 ms |
116+
| 15 × 3 | 5-wise | 729,729 | 1,277 | 220 ms | 761 ms |
117+
| 20 × 3 | 5-wise | 3,767,472 | 1,581 | 1.4 s | 4.2 s |
118+
119+
Apple M シリーズで計測(seed=42)。理論下限は直交配列 (OA) 理論または v² 下界に基づく既知の下限値。貪欲法アルゴリズムは一般に理論最小値の 1.5〜2.5 倍のテスト数を生成します。WASM と Pure TS は異なる RNG 実装を使用するため、テスト数はわずかに異なる場合があります。
120+
121+
ペアワイズ(最も一般的なユースケース)では WASM と Pure TS は同等の性能です。WASM が約3倍の優位を示すのは、60,000タプルを超える高強度構成のみです。
112122

113123
## 次のステップ
114124

0 commit comments

Comments
 (0)