func BenchmarkMarshalByGoMemdump(b *testing.B) { var buf bytes.Buffer //w := bufio.NewWriter(&buf) for i := 0; i < b.N; i++ { memdump.Encode(&buf, &group) } }
func BenchmarkUnmarshalByGoMemdump(b *testing.B) { result := &ColorGroup{} var buf bytes.Buffer memdump.Encode(&buf, &group) b.ResetTimer() for i := 0; i < b.N; i++ { memdump.Decode(&buf, &result) } }