diff --git a/README.en.md b/README.en.md index b4be006..e65ff9b 100644 --- a/README.en.md +++ b/README.en.md @@ -95,19 +95,16 @@ $ go test -v ./_examples/benchmarks_test.go -bench=. -benchtime=20s | test case | times ran (large is better) | ns/op (small is better) | B/op (small is better) | allocs/op (small is better) | | -----------|--------|-------------|-------------|-------------| -| **logit** |   4405342 | 5409 ns/op |   904 B/op | 12 allocs/op | -| **logit (without file info)** | 20341443 | 1130 ns/op |     32 B/op |   4 allocs/op | +| **logit** |   8617952 | 2807 ns/op |   352 B/op | 20 allocs/op | | logrus |   2990408 | 7991 ns/op | 1633 B/op | 52 allocs/op | | Golang log |   5308578 | 4539 ns/op |   920 B/op | 12 allocs/op | | Golog | 15536137 | 1556 ns/op |   232 B/op | 16 allocs/op | > Environment:I7-6700HQ CPU @ 2.6 GHZ, 16 GB RAM -**Notice that golog's output is without file info, and fetch file info will call runtime.Caller, which is expensive,** -**so it has no doubts that golog runs fast. However, we think file info is useful in check errors,** -**so we keep this feature, and provide a switch to turn off it for high-performance (coming soon).** - -_Logit is based on Golang log, so it looks like not better than Golang log. Don't worry, we will redesign the implement of log output!_ +**Notice that fetch file info will call runtime.Caller, which is expensive.** +**However, we think file info is useful in check errors,** +**so we keep this feature, and provide a switch to turn off it for high-performance.** ### 👥 Contributing diff --git a/README.md b/README.md index fc626e4..d755688 100644 --- a/README.md +++ b/README.md @@ -95,19 +95,16 @@ $ go test -v ./_examples/benchmarks_test.go -bench=. -benchtime=20s | 测试 | 单位时间内运行次数 (large is better) | ns/op (small is better) | B/op (small is better) | allocs/op (small is better) | | -----------|--------|-------------|-------------|-------------| -| **logit** |   4405342 | 5409 ns/op |   904 B/op | 12 allocs/op | -| **logit (关闭文件信息)** | 20341443 | 1130 ns/op |     32 B/op |   4 allocs/op | +| **logit** |   8617952 | 2807 ns/op |   352 B/op | 20 allocs/op | | logrus |   2990408 | 7991 ns/op | 1633 B/op | 52 allocs/op | | Golang log |   5308578 | 4539 ns/op |   920 B/op | 12 allocs/op | | Golog | 15536137 | 1556 ns/op |   232 B/op | 16 allocs/op | > 测试环境:I7-6700HQ CPU @ 2.6 GHZ,16 GB RAM -**注意:golog 库是不会输出文件信息的,也就是少了运行时操作(runtime.Caller 方法),性能自然会高很多,** +**注意:输出文件信息会有运行时操作(runtime.Caller 方法),非常影响性能,** **但是这个功能感觉还是比较实用的,尤其是在查找错误的时候,所以我们还是加了这个功能!** -**如果你更在乎性能,那我们也提供了一个选项可以关闭文件信息的查询(开发中)!** - -_由于目前的 logit 是基于 Golang log 的,所以成绩相比更差,后续会重新设计内部日志输出模块,所以当前成绩仅供参考!_ +**如果你更在乎性能,那我们也提供了一个选项可以关闭文件信息的查询!** ### 👥 贡献者