Skip to content

Commit 90a2168

Browse files
committed
make bench command
1 parent ab36a77 commit 90a2168

File tree

2 files changed

+2
-7
lines changed

2 files changed

+2
-7
lines changed

Makefile

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,4 @@ test:
33
go tool cover -html=cover.out
44

55
bench:
6-
cd examples/benchmarks/ && sqlite3 boiler.db "CREATE TABLE IF NOT EXISTS records (id integer primary key, name text)"
7-
cd examples/benchmarks/ && sqlboiler sqlite3
8-
cd examples/benchmarks/ && go run *.go && rm -rf *db && rm -rf *journal
6+
cd benchmark/ && go test -v -bench=. -benchmem

benchmark/bench_test.go

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,7 @@ func setupGORM() {
5353
}
5454

5555
func (u User) ConfigureEntity(e *orm.EntityConfigurator) {
56-
e.Table("users").PKSetter(func(o orm.Entity, pk interface{}) {
57-
user := o.(*User)
58-
user.ID = pk.(int64)
59-
})
56+
e.Table("users")
6057
}
6158

6259
func BenchmarkGolobby(t *testing.B) {

0 commit comments

Comments
 (0)