BenchmarkIsPushOnlyScript benchmarks how long it takes IsPushOnlyScript to analyze a very large script.
(b *testing.B)
| 273 | // BenchmarkIsPushOnlyScript benchmarks how long it takes IsPushOnlyScript to |
| 274 | // analyze a very large script. |
| 275 | func BenchmarkIsPushOnlyScript(b *testing.B) { |
| 276 | script, err := genComplexScript() |
| 277 | if err != nil { |
| 278 | b.Fatalf("failed to create benchmark script: %v", err) |
| 279 | } |
| 280 | |
| 281 | b.ResetTimer() |
| 282 | b.ReportAllocs() |
| 283 | for i := 0; i < b.N; i++ { |
| 284 | _ = IsPushOnlyScript(script) |
| 285 | } |
| 286 | } |
| 287 | |
| 288 | // BenchmarkIsWitnessPubKeyHash benchmarks how long it takes to analyze a very |
| 289 | // large script to determine if it is a standard witness pubkey hash script. |
nothing calls this directly
no test coverage detected
searching dependent graphs…