MCPcopy Create free account
hub / github.com/efectn/go-orm-benchmarks / Insert

Method Insert

bench/upper.go:51–63  ·  view source on GitHub ↗
(b *testing.B)

Source from the content-addressed store, hash-verified

49}
50
51func (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
65func (upper *Upper) InsertMulti(b *testing.B) {
66 m := NewModel4()

Callers

nothing calls this directly

Calls 5

NameMethod · 0.95
SetErrorFunction · 0.92
NewModel4Function · 0.85
InsertMethod · 0.65
ErrorMethod · 0.65

Tested by

no test coverage detected