MCPcopy
hub / github.com/shopspring/decimal / BenchmarkDecimal_NumDigits100

Function BenchmarkDecimal_NumDigits100

decimal_bench_test.go:137–150  ·  view source on GitHub ↗
(b *testing.B)

Source from the content-addressed store, hash-verified

135}
136
137func BenchmarkDecimal_NumDigits100(b *testing.B) {
138 s := make([]byte, 102)
139 for i := range s {
140 s[i] = byte('0' + i%10)
141 }
142 s[0] = '-'
143 s[100] = '.'
144 d, err := NewFromString(string(s))
145 if err != nil {
146 b.Log(d)
147 b.Error(err)
148 }
149 numDigits(b, 100, d)
150}
151
152func Benchmark_Cmp(b *testing.B) {
153 decimals := DecimalSlice([]Decimal{})

Callers

nothing calls this directly

Calls 2

NewFromStringFunction · 0.85
numDigitsFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…