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

Function Benchmark_Map_Old

mapper_benchmark_test.go:265–281  ·  view source on GitHub ↗

============ 对比基准测试 (原有实现) ============ Benchmark_Map_Old 基准测试: 原有 Mapper 方法

(b *testing.B)

Source from the content-addressed store, hash-verified

263
264// Benchmark_Map_Old 基准测试: 原有 Mapper 方法
265func Benchmark_Map_Old(b *testing.B) {
266 user := &BMUser{
267 ID: 1,
268 Name: "Test User",
269 Email: "test@example.com",
270 Age: 25,
271 CreatedAt: 1704067200,
272 Status: 1,
273 Score: 95.5,
274 }
275 userDTO := &BMUserDTO{}
276
277 b.ResetTimer()
278 for i := 0; i < b.N; i++ {
279 _ = Mapper(user, userDTO)
280 }
281}
282
283// Benchmark_MapSlice_Old 基准测试: 原有 MapperSlice 方法
284func Benchmark_MapSlice_Old(b *testing.B) {

Callers

nothing calls this directly

Calls 1

MapperFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…