MCPcopy
hub / github.com/bettercap/bettercap / BenchmarkConfigure

Function BenchmarkConfigure

modules/api_rest/api_rest_test.go:474–484  ·  view source on GitHub ↗
(b *testing.B)

Source from the content-addressed store, hash-verified

472}
473
474func BenchmarkConfigure(b *testing.B) {
475 s, _ := session.New()
476
477 b.ResetTimer()
478 for i := 0; i < b.N; i++ {
479 mod := NewRestAPI(s)
480 s.Env.Set("api.rest.address", "127.0.0.1")
481 s.Env.Set("api.rest.port", "8081")
482 _ = mod.Configure()
483 }
484}
485
486// Tests for controller functionality
487func TestCommandRequest(t *testing.T) {

Callers

nothing calls this directly

Calls 4

ConfigureMethod · 0.95
NewFunction · 0.92
NewRestAPIFunction · 0.85
SetMethod · 0.45

Tested by

no test coverage detected