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

Method Insert

bench/pop.go:44–56  ·  view source on GitHub ↗
(b *testing.B)

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 5

NameMethod · 0.95
SetErrorFunction · 0.92
NewModel3Function · 0.85
ErrorMethod · 0.65
CreateMethod · 0.45

Tested by

no test coverage detected