dencoding_benchmark_test.go
dencoding_benchmark_test.go - Overview
This file contains benchmark tests for the dencoding
package, specifically focusing on the performance of encoding and decoding integer values (both signed and unsigned).
Detailed Documentation
BenchmarkEncodeDecodeInt
- Purpose: Benchmarks the encoding and decoding of
int64
values usingdencoding.EncodeInt
anddencoding.DecodeInt
. - Parameters:
b
(*testing.B): The benchmark testing object.
- Returns: None
BenchmarkEncodeUIntConcurrent
- Purpose: Benchmarks the concurrent encoding performance of
uint64
values usingdencoding.EncodeUInt
. - Parameters:
b
(*testing.B): The benchmark testing object.
- Returns: None
BenchmarkDecodeUIntConcurrent
- Purpose: Benchmarks the concurrent decoding performance of
uint64
values usingdencoding.DecodeUInt
. - Parameters:
b
(*testing.B): The benchmark testing object.
- Returns: None
BenchmarkMinMaxEncodeDecodeInt
- Purpose: Benchmarks the encoding and decoding of
int64
values, including positive, negative, and values close tomath.MaxInt64
andmath.MinInt64
. It checks for correct round trip conversions. - Parameters:
b
(*testing.B): The benchmark testing object.
- Returns: None