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

Method Update

bench/zorm.go:93–110  ·  view source on GitHub ↗
(b *testing.B)

Source from the content-addressed store, hash-verified

91}
92
93func (zorm *Zorm) Update(b *testing.B) {
94 m := NewModel7()
95
96 _, err := zormdb.Insert(zormCtx, m)
97 if err != nil {
98 helper.SetError(b, zorm.Name(), "Update", err.Error())
99 }
100
101 b.ReportAllocs()
102 b.ResetTimer()
103
104 for i := 0; i < b.N; i++ {
105 _, err := zormdb.Update(zormCtx, m)
106 if err != nil {
107 helper.SetError(b, zorm.Name(), "Update", err.Error())
108 }
109 }
110}
111
112func (zorm *Zorm) Read(b *testing.B) {
113 m := NewModel7()

Callers

nothing calls this directly

Calls 6

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

Tested by

no test coverage detected