BenchmarkHashBalanceIDVaried measures hashing with different balance IDs
(b *testing.B)
| 252 | |
| 253 | // BenchmarkHashBalanceIDVaried measures hashing with different balance IDs |
| 254 | func BenchmarkHashBalanceIDVaried(b *testing.B) { |
| 255 | balanceIDs := make([]string, 1000) |
| 256 | for i := 0; i < 1000; i++ { |
| 257 | balanceIDs[i] = fmt.Sprintf("bln_%d", i) |
| 258 | } |
| 259 | |
| 260 | b.ResetTimer() |
| 261 | for i := 0; i < b.N; i++ { |
| 262 | _ = hashBalanceID(balanceIDs[i%1000]) |
| 263 | } |
| 264 | } |
| 265 | |
| 266 | // BenchmarkTransactionHashTxn measures transaction hash generation |
| 267 | func BenchmarkTransactionHashTxn(b *testing.B) { |
nothing calls this directly
no test coverage detected