From 2c2cbe07f5e10fdb996e2a039cde84be44866f18 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Sat, 21 Feb 2026 16:13:40 +0200 Subject: Add integration test framework: plan, workload binary, harness scaffolding - INTEGRATIONTESTS-PLAN.md: full design for e2e integration tests - integrationtests/cmd/ioworkload: standalone binary with 13 I/O scenarios - integrationtests/expectations.go: ExpectedEvent type and assertion helpers - integrationtests/parse.go: .ior.zst parser producing TestResult - Export IterRecord and LoadFromFile in flamegraph package - Fix TraceId -> TraceID, StringByName returns error instead of panic Amp-Thread-ID: https://ampcode.com/threads/T-019c8031-c106-757a-95a0-7a5457163ce7 Co-authored-by: Amp --- internal/flamegraph/collapsed.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'internal/flamegraph/collapsed.go') diff --git a/internal/flamegraph/collapsed.go b/internal/flamegraph/collapsed.go index aa0d81c..f04a38d 100644 --- a/internal/flamegraph/collapsed.go +++ b/internal/flamegraph/collapsed.go @@ -59,11 +59,15 @@ func (c Collapsed) Write(iorDataFile string) (string, error) { for record := range iod.iter() { var fieldValues []string for _, fieldName := range c.fields { - fieldValues = append(fieldValues, record.StringByName(fieldName)) + v, err := record.StringByName(fieldName) + if err != nil { + return outFile, fmt.Errorf("field %s: %w", fieldName, err) + } + fieldValues = append(fieldValues, v) } writer.Write([]byte(fmt.Sprintf("%s %d\n", strings.Join(fieldValues, ";"), - record.cnt.ValueByName(c.countField), + record.Cnt.ValueByName(c.countField), ))) } writer.Flush() -- cgit v1.2.3