mirror of
https://github.com/gopasspw/gopass.git
synced 2025-12-08 19:24:54 +00:00
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>
26 lines
361 B
Go
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")
|
|
}
|
|
}
|