Benchmarking for wwctl overlay build

- Benchmarks overlay build in an environment with 1000 nodes
- Updates testenv to support both benchmarks and tests

To execute:

```
go test github.com/warewulf/warewulf/internal/app/wwctl/overlay/build -bench Benchmark_Overlay_Build
```

Signed-off-by: Jonathon Anderson <janderson@ciq.com>
This commit is contained in:
Jonathon Anderson
2024-12-23 18:17:57 -07:00
parent 276e67fc54
commit a18913924d
55 changed files with 3361 additions and 245 deletions

View File

@@ -775,10 +775,10 @@ func Test_UpgradeNodesYaml(t *testing.T) {
for _, tt := range nodesYamlUpgradeTests {
t.Run(tt.name, func(t *testing.T) {
env := testenv.New(t)
defer env.RemoveAll(t)
defer env.RemoveAll()
if tt.files != nil {
for fileName, content := range tt.files {
env.WriteFile(t, fileName, content)
env.WriteFile(fileName, content)
}
}
legacy, err := ParseNodes([]byte(tt.legacyYaml))