Home / File/ default_validator_benchmark_test.go — gin Source File

default_validator_benchmark_test.go — gin Source File

Architecture documentation for default_validator_benchmark_test.go, a go file in the gin codebase. 1 imports, 0 dependents.

File go RequestBinding Validation 1 imports 1 functions

Entity Profile

Dependency Diagram

graph LR
  c4ddb0b5_3667_31b9_0b5a_e8ac6a79a794["default_validator_benchmark_test.go"]
  285f3da5_b453_bac8_eb53_efea9feb6bb9["errors"]
  c4ddb0b5_3667_31b9_0b5a_e8ac6a79a794 --> 285f3da5_b453_bac8_eb53_efea9feb6bb9
  style c4ddb0b5_3667_31b9_0b5a_e8ac6a79a794 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

// Copyright 2022 Gin Core Team. All rights reserved.
// Use of this source code is governed by a MIT style
// license that can be found in the LICENSE file.

package binding

import (
	"errors"
	"strconv"
	"testing"
)

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")
		}
	}
}

Subdomains

Dependencies

  • errors

Frequently Asked Questions

What does default_validator_benchmark_test.go do?
default_validator_benchmark_test.go is a source file in the gin codebase, written in go. It belongs to the RequestBinding domain, Validation subdomain.
What functions are defined in default_validator_benchmark_test.go?
default_validator_benchmark_test.go defines 1 function(s): BenchmarkSliceValidationError.
What does default_validator_benchmark_test.go depend on?
default_validator_benchmark_test.go imports 1 module(s): errors.
Where is default_validator_benchmark_test.go in the architecture?
default_validator_benchmark_test.go is located at binding/default_validator_benchmark_test.go (domain: RequestBinding, subdomain: Validation, directory: binding).

Analyze Your Own Codebase

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

Try Supermodel Free