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

Function BenchmarkSetTransactionMetadata

transaction_benchmark_test.go:290–296  ·  view source on GitHub ↗

BenchmarkSetTransactionMetadata measures transaction metadata setup

(b *testing.B)

Source from the content-addressed store, hash-verified

288
289// BenchmarkSetTransactionMetadata measures transaction metadata setup
290func BenchmarkSetTransactionMetadata(b *testing.B) {
291 b.ResetTimer()
292 for i := 0; i < b.N; i++ {
293 txn := createTestTransaction("source-001", "dest-001", fmt.Sprintf("ref-%d", i), 100.00)
294 setTransactionMetadata(txn)
295 }
296}
297
298// BenchmarkBigIntOperations measures big.Int arithmetic used in balance calculations
299func BenchmarkBigIntOperations(b *testing.B) {

Callers

nothing calls this directly

Calls 2

createTestTransactionFunction · 0.85
setTransactionMetadataFunction · 0.85

Tested by

no test coverage detected