Home / Function/ benchGenericParseTypeUInt() — fiber Function Reference

benchGenericParseTypeUInt() — fiber Function Reference

Architecture documentation for the benchGenericParseTypeUInt() function in helpers_test.go from the fiber codebase.

Entity Profile

Dependency Diagram

graph TD
  3ed199e8_3943_3b03_f9cc_cfed7de5b835["benchGenericParseTypeUInt()"]
  c82e3595_b1b8_f596_c097_f26fa40159d1["helpers_test.go"]
  3ed199e8_3943_3b03_f9cc_cfed7de5b835 -->|defined in| c82e3595_b1b8_f596_c097_f26fa40159d1
  style 3ed199e8_3943_3b03_f9cc_cfed7de5b835 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

helpers_test.go lines 1337–1356

func benchGenericParseTypeUInt[V GenericTypeInteger](b *testing.B, name string, test testGenericParseTypeUintCase) {
	b.Helper()
	b.Run(name, func(t *testing.B) {
		var v V
		var err error
		b.ReportAllocs()
		b.ResetTimer()
		b.RunParallel(func(pb *testing.PB) {
			for pb.Next() {
				v, err = genericParseType[V](strconv.FormatUint(test.value, 10))
			}
		})
		if test.bits <= int(unsafe.Sizeof(V(0)))*8 {
			require.NoError(t, err)
			require.Equal(t, V(test.value), v)
		} else {
			require.ErrorIs(t, err, strconv.ErrRange)
		}
	})
}

Domain

Subdomains

Defined In

Frequently Asked Questions

What does benchGenericParseTypeUInt() do?
benchGenericParseTypeUInt() is a function in the fiber codebase, defined in helpers_test.go.
Where is benchGenericParseTypeUInt() defined?
benchGenericParseTypeUInt() is defined in helpers_test.go at line 1337.

Analyze Your Own Codebase

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

Try Supermodel Free