MCPcopy Index your code
hub / github.com/devfeel/mapper / BenchmarkObjectAutoMapper

Function BenchmarkObjectAutoMapper

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

Source from the content-addressed store, hash-verified

427}
428
429func BenchmarkObjectAutoMapper(b *testing.B) {
430 m := NewMapper()
431 m.Register(&FromStruct{})
432 m.Register(&ToStruct{})
433 from := &FromStruct{Name: "From", Sex: true, AA: "AA"}
434 to := &ToStruct{}
435
436 for i := 0; i < b.N; i++ {
437 m.Mapper(from, to)
438 }
439}
440
441func BenchmarkObjectAutoMapper_Map(b *testing.B) {
442 m := NewMapper()

Callers

nothing calls this directly

Calls 3

NewMapperFunction · 0.85
RegisterMethod · 0.65
MapperMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…