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

Method Insert

bench/rel.go:55–68  ·  view source on GitHub ↗
(b *testing.B)

Source from the content-addressed store, hash-verified

53}
54
55func (rel *Rel) Insert(b *testing.B) {
56 m := NewModel3()
57
58 b.ReportAllocs()
59 b.ResetTimer()
60
61 for i := 0; i < b.N; i++ {
62 m.ID = 0
63 err := rel.conn.Insert(ctx, m)
64 if err != nil {
65 helper.SetError(b, rel.Name(), "Insert", err.Error())
66 }
67 }
68}
69
70func (rel *Rel) InsertMulti(b *testing.B) {
71 ms := make([]*Model3, 0, 100)

Callers

nothing calls this directly

Calls 5

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

Tested by

no test coverage detected