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

Method Update

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

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 6

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

Tested by

no test coverage detected