Commit c9b890b1 authored by JessonChan's avatar JessonChan

add asynchronous benchmark

parent e32e3a75
......@@ -131,3 +131,13 @@ func BenchmarkFile(b *testing.B) {
}
os.Remove("test4.log")
}
func BenchmarkAsynchronousFile(b *testing.B) {
log := NewLogger(100000)
log.SetLogger("file", `{"filename":"test4.log"}`)
log.Async()
for i := 0; i < b.N; i++ {
log.Debug("debug")
}
os.Remove("test4.log")
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment