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

Method Read

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

Source from the content-addressed store, hash-verified

110}
111
112func (zorm *Zorm) Read(b *testing.B) {
113 m := NewModel7()
114
115 _, err := zormdb.Insert(zormCtx, m)
116 if err != nil {
117 helper.SetError(b, zorm.Name(), "Read", err.Error())
118 }
119
120 b.ReportAllocs()
121 b.ResetTimer()
122
123 for i := 0; i < b.N; i++ {
124 _, err := zormdb.QueryRow(zormCtx, readFinder, m)
125 if err != nil {
126 helper.SetError(b, zorm.Name(), "Read", err.Error())
127 }
128 }
129}
130
131func (zorm *Zorm) ReadSlice(b *testing.B) {
132 m := NewModel7()

Callers

nothing calls this directly

Calls 5

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

Tested by

no test coverage detected