github.com/gogf/gf@v1.16.9/os/gcron/gcron_z_bench_test.go (about) 1 // Copyright GoFrame Author(https://goframe.org). All Rights Reserved. 2 // 3 // This Source Code Form is subject to the terms of the MIT License. 4 // If a copy of the MIT was not distributed with this file, 5 // You can obtain one at https://github.com/gogf/gf. 6 7 package gcron_test 8 9 import ( 10 "testing" 11 12 "github.com/gogf/gf/os/gcron" 13 ) 14 15 func Benchmark_Add(b *testing.B) { 16 for i := 0; i < b.N; i++ { 17 gcron.Add("1 1 1 1 1 1", func() { 18 19 }) 20 } 21 }