MCPcopy Create free account
hub / github.com/devfeel/mapper / BenchmarkObjectMapperSlice

Function BenchmarkObjectMapperSlice

mapper_object_test.go:248–258  ·  view source on GitHub ↗
(b *testing.B)

Source from the content-addressed store, hash-verified

246}
247
248func BenchmarkObjectMapperSlice(b *testing.B) {
249 m := NewMapper()
250 var fromSlice []*FromStruct
251 var toSlice []*ToStruct
252 for i := 0; i < 10; i++ {
253 fromSlice = append(fromSlice, &FromStruct{Name: "From" + strconv.Itoa(i), Sex: true, AA: "AA" + strconv.Itoa(i)})
254 }
255 for i := 0; i < b.N; i++ {
256 m.MapperSlice(fromSlice, &toSlice)
257 }
258}
259
260func Test_Object_AutoMapper(t *testing.T) {
261 m := NewMapper()

Callers

nothing calls this directly

Calls 2

NewMapperFunction · 0.85
MapperSliceMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…