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

Method Read

bench/godb.go:88–105  ·  view source on GitHub ↗
(b *testing.B)

Source from the content-addressed store, hash-verified

86}
87
88func (godb *Godb) Read(b *testing.B) {
89 m := NewModel2()
90
91 err := godb.conn.Insert(m).Do()
92 if err != nil {
93 helper.SetError(b, godb.Name(), "Read", err.Error())
94 }
95
96 b.ReportAllocs()
97 b.ResetTimer()
98
99 for i := 0; i < b.N; i++ {
100 err := godb.conn.Select(m).Do()
101 if err != nil {
102 helper.SetError(b, godb.Name(), "Read", err.Error())
103 }
104 }
105}
106
107func (godb *Godb) ReadSlice(b *testing.B) {
108 m := NewModel2()

Callers

nothing calls this directly

Calls 6

NameMethod · 0.95
SetErrorFunction · 0.92
NewModel2Function · 0.85
InsertMethod · 0.65
ErrorMethod · 0.65
SelectMethod · 0.45

Tested by

no test coverage detected