Home / Function/ benchGenericParseTypeInt() — fiber Function Reference

benchGenericParseTypeInt() — fiber Function Reference

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

Entity Profile

Dependency Diagram

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

Relationship Graph

Source Code

helpers_test.go lines 1258–1277

func benchGenericParseTypeInt[V GenericTypeInteger](b *testing.B, name string, test testGenericParseTypeIntCase) {
	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.FormatInt(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 benchGenericParseTypeInt() do?
benchGenericParseTypeInt() is a function in the fiber codebase, defined in helpers_test.go.
Where is benchGenericParseTypeInt() defined?
benchGenericParseTypeInt() is defined in helpers_test.go at line 1258.

Analyze Your Own Codebase

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

Try Supermodel Free