gopass/pkg/debug/debug_test.go
Dominik Schulz ff349772ac
Reduce dependencies on internal packages (#1707)
This PR moves some packages from internal to pkg to increase the
independence of binaries in cmd/ from internal packages further.

RELEASE_NOTES=n/a

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>
2021-01-13 18:21:09 +01:00

26 lines
361 B
Go

package debug
import (
"os"
"testing"
)
func BenchmarkLogging(b *testing.B) {
os.Setenv("GOPASS_DEBUG", "true")
defer func() { os.Unsetenv("GOPASS_DEBUG") }()
initDebug()
for i := 0; i < b.N; i++ {
Log("string")
}
}
func BenchmarkNoLogging(b *testing.B) {
os.Unsetenv("GOPASS_DEBUG")
initDebug()
for i := 0; i < b.N; i++ {
Log("string")
}
}