// Copyright 2010 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package proto_test import ( "strconv" "testing" "github.com/golang/protobuf/proto" tpb "github.com/golang/protobuf/proto/proto3_proto" "github.com/golang/protobuf/ptypes" ) var ( blackhole []byte ) // BenchmarkAny creates increasingly large arbitrary Any messages. The type is always the // same. func BenchmarkAny(b *testing.B) { data := make([]byte, 1<<20) quantum := 1 << 10 for i := uint(0); i <= 10; i++ { b.Run(strconv.Itoa(quantum<