1 Star 0 Fork 0

@攻城师 / carbon

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
parser_bench_test.go 385 Bytes
一键复制 编辑 原始数据 按行查看 历史
gouguoyin 提交于 2023-12-28 11:28 . Add benchmark test files
package carbon
import "testing"
func BenchmarkCarbon_Parse(b *testing.B) {
for n := 0; n < b.N; n++ {
Parse("2020-08-05")
}
}
func BenchmarkCarbon_ParseByFormat(b *testing.B) {
for n := 0; n < b.N; n++ {
ParseByFormat("2020-08-05", "Y-m-d")
}
}
func BenchmarkCarbon_ParseByLayout(b *testing.B) {
for n := 0; n < b.N; n++ {
ParseByLayout("2020-08-05", "2006-01-02")
}
}
1
https://gitee.com/homevip/carbon.git
git@gitee.com:homevip/carbon.git
homevip
carbon
carbon
master

搜索帮助

53164aa7 5694891 3bd8fe86 5694891