Skip to content

Commit

Permalink
make bench command
Browse files Browse the repository at this point in the history
  • Loading branch information
amirrezaask committed Jun 1, 2022
1 parent ab36a77 commit 90a2168
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
4 changes: 1 addition & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,4 @@ test:
go tool cover -html=cover.out

bench:
cd examples/benchmarks/ && sqlite3 boiler.db "CREATE TABLE IF NOT EXISTS records (id integer primary key, name text)"
cd examples/benchmarks/ && sqlboiler sqlite3
cd examples/benchmarks/ && go run *.go && rm -rf *db && rm -rf *journal
cd benchmark/ && go test -v -bench=. -benchmem
5 changes: 1 addition & 4 deletions benchmark/bench_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,7 @@ func setupGORM() {
}

func (u User) ConfigureEntity(e *orm.EntityConfigurator) {
e.Table("users").PKSetter(func(o orm.Entity, pk interface{}) {
user := o.(*User)
user.ID = pk.(int64)
})
e.Table("users")
}

func BenchmarkGolobby(t *testing.B) {
Expand Down

0 comments on commit 90a2168

Please sign in to comment.