BenchmarkTransactionHashTxn measures transaction hash generation
(b *testing.B)
| 265 | |
| 266 | // BenchmarkTransactionHashTxn measures transaction hash generation |
| 267 | func BenchmarkTransactionHashTxn(b *testing.B) { |
| 268 | txn := createTestTransaction("source-001", "dest-001", "ref-001", 100.00) |
| 269 | txn.TransactionID = "txn-benchmark-001" |
| 270 | txn.CreatedAt = time.Now() |
| 271 | txn.PreciseAmount = big.NewInt(10000) |
| 272 | |
| 273 | b.ResetTimer() |
| 274 | for i := 0; i < b.N; i++ { |
| 275 | _ = txn.HashTxn() |
| 276 | } |
| 277 | } |
| 278 | |
| 279 | // BenchmarkApplyPrecision measures precision application to transactions |
| 280 | func BenchmarkApplyPrecision(b *testing.B) { |
nothing calls this directly
no test coverage detected