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

Function BenchmarkObjectMapper

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

Source from the content-addressed store, hash-verified

415}
416
417func BenchmarkObjectMapper(b *testing.B) {
418 m := NewMapper()
419 m.Register(&FromStruct{})
420 m.Register(&ToStruct{})
421 from := &FromStruct{Name: "From", Sex: true, AA: "AA"}
422 to := &ToStruct{}
423
424 for i := 0; i < b.N; i++ {
425 m.Mapper(from, to)
426 }
427}
428
429func BenchmarkObjectAutoMapper(b *testing.B) {
430 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…