MCPcopy Create free account
hub / github.com/LagrangeDev/LagrangeGo / Benchmark_encoder_uvarint

Function Benchmark_encoder_uvarint

internal/proto/dynamic_test.go:27–37  ·  view source on GitHub ↗
(b *testing.B)

Source from the content-addressed store, hash-verified

25}
26
27func Benchmark_encoder_uvarint(b *testing.B) {
28 b.Run("short", func(b *testing.B) {
29 benchEncoderUvarint(b, uint64(1))
30 })
31 b.Run("medium", func(b *testing.B) {
32 benchEncoderUvarint(b, uint64(114514))
33 })
34 b.Run("large", func(b *testing.B) {
35 benchEncoderUvarint(b, math.MaxUint64)
36 })
37}
38
39func Benchmark_encoder_svarint(b *testing.B) {
40 b.Run("short", func(b *testing.B) {

Callers

nothing calls this directly

Calls 1

benchEncoderUvarintFunction · 0.85

Tested by

no test coverage detected