mirror of
https://github.com/projectdiscovery/nuclei.git
synced 2025-12-18 15:05:26 +00:00
20 lines
362 B
Go
20 lines
362 B
Go
|
|
package flow_test
|
||
|
|
|
||
|
|
import (
|
||
|
|
"testing"
|
||
|
|
|
||
|
|
"github.com/projectdiscovery/nuclei/v3/pkg/tmplexec/flow"
|
||
|
|
"github.com/projectdiscovery/nuclei/v3/pkg/types"
|
||
|
|
)
|
||
|
|
|
||
|
|
func BenchmarkGetJSRuntime(b *testing.B) {
|
||
|
|
opts := types.DefaultOptions()
|
||
|
|
|
||
|
|
b.ResetTimer()
|
||
|
|
b.ReportAllocs()
|
||
|
|
for i := 0; i < b.N; i++ {
|
||
|
|
runtime := flow.GetJSRuntime(opts)
|
||
|
|
flow.PutJSRuntime(runtime)
|
||
|
|
}
|
||
|
|
}
|