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

Method Update

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

Source from the content-addressed store, hash-verified

60}
61
62func (pop *Pop) Update(b *testing.B) {
63 m := NewModel3()
64
65 err := pop.conn.Create(m)
66 if err != nil {
67 helper.SetError(b, pop.Name(), "Update", err.Error())
68 }
69
70 b.ReportAllocs()
71 b.ResetTimer()
72
73 for i := 0; i < b.N; i++ {
74 err := pop.conn.Update(m)
75 if err != nil {
76 helper.SetError(b, pop.Name(), "Update", err.Error())
77 }
78 }
79}
80
81func (pop *Pop) Read(b *testing.B) {
82 m := NewModel3()

Callers

nothing calls this directly

Calls 6

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

Tested by

no test coverage detected