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

Method Update

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

Source from the content-addressed store, hash-verified

74}
75
76func (reform *Reform) Update(b *testing.B) {
77 m := NewReformModel()
78
79 err := reform.conn.Save(m)
80 if err != nil {
81 helper.SetError(b, reform.Name(), "Update", err.Error())
82 }
83
84 b.ReportAllocs()
85 b.ResetTimer()
86
87 for i := 0; i < b.N; i++ {
88 err := reform.conn.Update(m)
89 if err != nil {
90 helper.SetError(b, reform.Name(), "Update", err.Error())
91 }
92 }
93}
94
95func (reform *Reform) Read(b *testing.B) {
96 m := NewReformModel()

Callers

nothing calls this directly

Calls 6

NameMethod · 0.95
SetErrorFunction · 0.92
NewReformModelFunction · 0.85
ErrorMethod · 0.65
UpdateMethod · 0.65
SaveMethod · 0.45

Tested by

no test coverage detected