test(e2e): Add §3.3 comparison script (host-side vs guest-clone)

Create Test-E2E-Section3.3.ps1 for side-by-side measurement:
- Runs nsis-plugin-nsinnounp with default host-side clone (baseline)
- Runs same build with -UseGitClone flag (target: guest-side git)
- Displays elapsed time, artifact size, performance delta

Usage:
  .\scripts\Test-E2E-Section3.3.ps1               # Full comparison
  .\scripts\Test-E2E-Section3.3.ps1 -SkipBaseline  # Guest-clone only
  .\scripts\Test-E2E-Section3.3.ps1 -SkipGuestClone # Baseline only

Prerequisite: Template VM has Git installed (§6.6 Tier-1 Toolchain).

Also: Defer §3.5 (vCPU/RAM tuning) and §3.4 (pre-warm pool) to home lab
section — not required for initial CI operability.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Simone
2026-05-10 21:00:03 +02:00
parent 021ce9718f
commit 13ecd823dc
3 changed files with 247 additions and 7 deletions
+19 -6
View File
@@ -31,7 +31,7 @@ _Last updated: 2026-05-10 (post Sprint 7: §1.6/§3.2 done, test plan created)_
| [ ] | Gitea Workflow Integration | 4 | 1 | manca solo §P3 generalizzazione workflow |
| [x] | §1 Sicurezza & hardening | 3 | 0 | 1.1, 1.4, 1.6 done; 1.2/1.3/1.5/1.7/1.8 deferred (home lab) |
| [x] | §2 Affidabilità & resilienza | 7 | 0 | tutto done (2.1-2.7) |
| [ ] | §3 Performance & throughput | 4 | 1 | 3.1/3.2/3.3/3.6 done; 3.5 backlog; 3.4 deferred |
| [ ] | §3 Performance & throughput | 4 | 1 | 3.1/3.2/3.3/3.6 done; 3.5/3.4 deferred (home lab optimization) |
| [x] | §4 Osservabilità & manutenzione | 3 | 0 | 4.1/4.3/4.4 done (4.2 Prometheus, 4.5 Dashboard rimossi) |
| [x] | §5 Qualità codice & test | 5 | 0 | 5.1/5.2/5.3/5.4/5.5 done |
| [ ] | §6 Scalabilità & estensioni | 1 | 5 | 6.6 (Git+7-Zip) done; 6.1 (Linux), 6.2-6.5 (estensioni) TODO |
@@ -40,12 +40,12 @@ _Last updated: 2026-05-10 (post Sprint 7: §1.6/§3.2 done, test plan created)_
| [ ] | Linux Build VM (§6.1) | 0 | 4 | bozza in `docs/LINUX-TEMPLATE-SETUP.md` |
**Prossimi passi consigliati** (vedi anche "Suggerimento di sequencing" in fondo):
1. **E2E Test §3.3** — eseguire nsis-plugin-nsinnounp con `-UseGitClone` flag (misurare vs default)
1. **E2E Test §3.3** — eseguire `scripts/Test-E2E-Section3.3.ps1` (nsis-plugin-nsinnounp con `-UseGitClone` flag)
2. **Test Plan** — eseguire completo `docs/TEST-PLAN-v1.3-to-HEAD.md` (25+ Pester tests, validazione features)
3. **§6.6 expansion** — Toolchain Tier-2 (PowerShell 7, NSIS, CMake, Node.js, WiX, gh, Sysinternals, vcpkg)
4. **§3.5** — vCPU/RAM tuning per workload (P2, estendere params a Invoke-CIJob)
5. **§3.4** — Pre-warm pool di cloni (P3, deferred — profiling-dependent optimization)
6. **Security**Rifiori se condizioni cambiano; vedi sezione "Deferred (Home Lab)"
4. **Security**Rifiori se condizioni cambiano; vedi sezione "Deferred (Home Lab)"
5. **§3.5** — vCPU/RAM tuning per workload (P2, deferred — home lab optimization)
6. **§3.4** — Pre-warm pool di cloni (P3, deferred — profiling-dependent optimization)
---
## Setup & Infrastructure
@@ -339,7 +339,7 @@ File: [scripts/Invoke-CIJob.ps1](scripts/Invoke-CIJob.ps1), [scripts/Invoke-Remo
**Beneficio**: Elimina host-zip-transfer overhead (rilevante per repo > 200 MB con submoduli).
**Prossimo**: E2E test con nsis-plugin-nsinnounp (-UseGitClone flag) per misurare impatto.
### 3.5 [P2] [ ] vCPU/RAM tuning per workload
### 3.5 [P2] [ ] vCPU/RAM tuning per workload — DEFERRED (home lab)
File: [docs/OPTIMIZATION.md:82-89](docs/OPTIMIZATION.md), VMX template.
`numvcpus=4`, `memsize=6144` è ragionevole ma non ottimo per ogni build. Per
@@ -349,6 +349,8 @@ Considerare:
- VMX pinning: 6 vCPU per build C++ pesanti, 2 vCPU per build .NET piccoli.
- Esporre `-VMCpu` / `-VMMemory` a `Invoke-CIJob.ps1` con override via workflow.
**Deferred**: Non necessario per home lab; priorità bassa fino a che performance non è bottleneck.
### 3.6 [P2] [x] Benchmark baseline — COMPLETATO 2026-05-10
File: [scripts/Measure-CIBenchmark.ps1](scripts/Measure-CIBenchmark.ps1).
@@ -768,6 +770,17 @@ monitora il pool e ricrea cloni dopo uso.
**Rifiori quando**: Profiling mostra che New-BuildVM+Wait-VMReady è bottleneck >30% nel
tempo totale di job. Con build >2 minuti, overhead stimato ~40% (rilevante solo per 1-min builds).
### 3.5 [P2] [ ] vCPU/RAM tuning per workload
File: [docs/OPTIMIZATION.md](docs/OPTIMIZATION.md), VMX template config.
Esporre parametri `-VMCpu` / `-VMMemory` a `Invoke-CIJob.ps1` per permettere override
da workflow. Attualmente fisso a `numvcpus=4, memsize=6144` — subottimo per build leggeri
(waste) e pesanti (throttle).
**Stato attuale**: Progettato, non implementato. Template supporta la modifica.
**Rifiori quando**: Performance profiling mostra contentione CPU/RAM è bottleneck per la
workload target. Per home lab, 4 vCPU/6 GB è ragionevole compromesso.
---
## Suggerimento di sequencing