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

Method Insert

bench/gorp.go:42–54  ·  view source on GitHub ↗
(b *testing.B)

Source from the content-addressed store, hash-verified

40}
41
42func (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
56func (gorp *Gorp) InsertMulti(b *testing.B) {
57 helper.SetError(b, gorp.Name(), "InsertMulti", "bulk-insert is not supported")

Callers

nothing calls this directly

Calls 5

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

Tested by

no test coverage detected