github.com/eden-framework/sqlx@v0.0.2/db_test.go (about) 1 package sqlx_test 2 3 import ( 4 "testing" 5 6 "github.com/eden-framework/sqlx" 7 ) 8 9 func BenchmarkDB_DBExecutor(b *testing.B) { 10 dbTest := sqlx.NewDatabase("test_for_user") 11 db := dbTest.OpenDB(mysqlConnector) 12 13 run := func(db sqlx.DBExecutor) { 14 db.D() 15 } 16 17 for i := 0; i <= b.N; i++ { 18 run(db) 19 } 20 }