Home / Function/ BenchmarkSliceValidationError() — gin Function Reference

BenchmarkSliceValidationError() — gin Function Reference

Architecture documentation for the BenchmarkSliceValidationError() function in default_validator_benchmark_test.go from the gin codebase.

Entity Profile

Relationship Graph

Source Code

binding/default_validator_benchmark_test.go lines 13–27

func BenchmarkSliceValidationError(b *testing.B) {
	const size int = 100
	e := make(SliceValidationError, size)
	for j := 0; j < size; j++ {
		e[j] = errors.New(strconv.Itoa(j))
	}

	b.ReportAllocs()

	for b.Loop() {
		if len(e.Error()) == 0 {
			b.Errorf("error")
		}
	}
}

Domain

Subdomains

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free