Skip to content

nested benchmarks are reported as failure #182

@XANi

Description

@XANi

Example:

func BenchmarkTree(b *testing.B) {
        sizes := []int{1, 2, 4, 8, 16}
        for _, size := range sizes {
                b.Run(
                        fmt.Sprintf("size: %d", size),
                        func(b *testing.B) {
                                for i := 0; i < b.N; i++ {
                                        test(i + size)
                                }
                        })
        }
}

reports:

failures="0" errors="1" id="0"

when running benchmark with JSON output

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions