(b *testing.B)
| 49 | } |
| 50 | |
| 51 | func (upper *Upper) Insert(b *testing.B) { |
| 52 | m := NewModel4() |
| 53 | |
| 54 | b.ReportAllocs() |
| 55 | b.ResetTimer() |
| 56 | |
| 57 | for i := 0; i < b.N; i++ { |
| 58 | _, err := upper.conn.Collection("models").Insert(m) |
| 59 | if err != nil { |
| 60 | helper.SetError(b, upper.Name(), "Insert", err.Error()) |
| 61 | } |
| 62 | } |
| 63 | } |
| 64 | |
| 65 | func (upper *Upper) InsertMulti(b *testing.B) { |
| 66 | m := NewModel4() |