benchmark_test.go 314 Bytes
Newer Older
“李磊”'s avatar
“李磊” committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
package l

import "testing"

func BenchmarkLogMsg(b *testing.B) {
	err := SetConfig(Config{
		Path:    "/tmp/dlog.log",
		MaxSize: 100000,
		Quiet:   true,
	})
	if err != nil {
		b.Error(err)
	}

	for i := 0; i < b.N; i++ {
		Info("hello logxxxxxxxlogxxxxxxxlogxxxxxxxlogxxxxxxxlogxxxxxxx")
	}
}