summaryrefslogtreecommitdiffstats
path: root/vendor/github.com/spf13/jwalterweatherman/notepad_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/spf13/jwalterweatherman/notepad_test.go')
-rw-r--r--vendor/github.com/spf13/jwalterweatherman/notepad_test.go11
1 files changed, 10 insertions, 1 deletions
diff --git a/vendor/github.com/spf13/jwalterweatherman/notepad_test.go b/vendor/github.com/spf13/jwalterweatherman/notepad_test.go
index d0e3ab04b..69ad6f8fc 100644
--- a/vendor/github.com/spf13/jwalterweatherman/notepad_test.go
+++ b/vendor/github.com/spf13/jwalterweatherman/notepad_test.go
@@ -13,7 +13,6 @@ import (
)
func TestNotepad(t *testing.T) {
-
var logHandle, outHandle bytes.Buffer
n := NewNotepad(LevelCritical, LevelError, &outHandle, &logHandle, "TestNotePad", 0)
@@ -39,3 +38,13 @@ func TestThresholdString(t *testing.T) {
require.Equal(t, LevelError.String(), "ERROR")
require.Equal(t, LevelTrace.String(), "TRACE")
}
+
+func BenchmarkLogPrintOnlyToCounter(b *testing.B) {
+ var logHandle, outHandle bytes.Buffer
+ n := NewNotepad(LevelCritical, LevelCritical, &outHandle, &logHandle, "TestNotePad", 0)
+
+ b.ResetTimer()
+ for i := 0; i < b.N; i++ {
+ n.INFO.Print("Test")
+ }
+}