MCPcopy Create free account
hub / github.com/devaccuracy/ledgerforge / BenchmarkApplyPrecision

Function BenchmarkApplyPrecision

transaction_benchmark_test.go:280–287  ·  view source on GitHub ↗

BenchmarkApplyPrecision measures precision application to transactions

(b *testing.B)

Source from the content-addressed store, hash-verified

278
279// BenchmarkApplyPrecision measures precision application to transactions
280func BenchmarkApplyPrecision(b *testing.B) {
281 b.ResetTimer()
282 for i := 0; i < b.N; i++ {
283 txn := createTestTransaction("source-001", "dest-001", "ref-001", 100.50)
284 txn.Precision = 100
285 _ = model.ApplyPrecision(txn)
286 }
287}
288
289// BenchmarkSetTransactionMetadata measures transaction metadata setup
290func BenchmarkSetTransactionMetadata(b *testing.B) {

Callers

nothing calls this directly

Calls 2

ApplyPrecisionFunction · 0.92
createTestTransactionFunction · 0.85

Tested by

no test coverage detected