(b *testing.B)
| 40 | } |
| 41 | |
| 42 | func (gorp *Gorp) Insert(b *testing.B) { |
| 43 | m := NewModel() |
| 44 | |
| 45 | b.ReportAllocs() |
| 46 | b.ResetTimer() |
| 47 | |
| 48 | for i := 0; i < b.N; i++ { |
| 49 | err := gorp.conn.Insert(m) |
| 50 | if err != nil { |
| 51 | helper.SetError(b, gorp.Name(), "Insert", err.Error()) |
| 52 | } |
| 53 | } |
| 54 | } |
| 55 | |
| 56 | func (gorp *Gorp) InsertMulti(b *testing.B) { |
| 57 | helper.SetError(b, gorp.Name(), "InsertMulti", "bulk-insert is not supported") |