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

Function BenchmarkMapperMap

mapper_test.go:494–506  ·  view source on GitHub ↗
(b *testing.B)

Source from the content-addressed store, hash-verified

492}
493
494func BenchmarkMapperMap(b *testing.B) {
495 Register(&testStruct{})
496 fromMap := make(map[string]interface{})
497 fromMap["Name"] = "test"
498 fromMap["Sex"] = true
499 fromMap["Age"] = 10
500 fromMap["time"] = time.Now()
501 toObj := &testStruct{}
502
503 for i := 0; i < b.N; i++ {
504 MapperMap(fromMap, toObj)
505 }
506}
507
508func BenchmarkSyncMap(b *testing.B) {
509 var sMap sync.Map

Callers

nothing calls this directly

Calls 2

RegisterFunction · 0.85
MapperMapFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…