Cleanup content-type protobuf constants
This commit is contained in:
@@ -121,7 +121,7 @@ func TestProtobufRoundTrip(t *testing.T) {
|
||||
func BenchmarkEncodeCodecProtobuf(b *testing.B) {
|
||||
items := benchmarkItems(b)
|
||||
width := len(items)
|
||||
s := protobuf.NewSerializer(nil, nil, "application/arbitrary.content.type")
|
||||
s := protobuf.NewSerializer(nil, nil)
|
||||
b.ResetTimer()
|
||||
for i := 0; i < b.N; i++ {
|
||||
if _, err := runtime.Encode(s, &items[i%width]); err != nil {
|
||||
@@ -142,7 +142,7 @@ func BenchmarkEncodeCodecFromInternalProtobuf(b *testing.B) {
|
||||
b.Fatal(err)
|
||||
}
|
||||
}
|
||||
s := protobuf.NewSerializer(nil, nil, "application/arbitrary.content.type")
|
||||
s := protobuf.NewSerializer(nil, nil)
|
||||
codec := legacyscheme.Codecs.EncoderForVersion(s, v1.SchemeGroupVersion)
|
||||
b.ResetTimer()
|
||||
for i := 0; i < b.N; i++ {
|
||||
@@ -170,7 +170,7 @@ func BenchmarkEncodeProtobufGeneratedMarshal(b *testing.B) {
|
||||
func BenchmarkDecodeCodecToInternalProtobuf(b *testing.B) {
|
||||
items := benchmarkItems(b)
|
||||
width := len(items)
|
||||
s := protobuf.NewSerializer(legacyscheme.Scheme, legacyscheme.Scheme, "application/arbitrary.content.type")
|
||||
s := protobuf.NewSerializer(legacyscheme.Scheme, legacyscheme.Scheme)
|
||||
encoder := legacyscheme.Codecs.EncoderForVersion(s, v1.SchemeGroupVersion)
|
||||
var encoded [][]byte
|
||||
for i := range items {
|
||||
|
Reference in New Issue
Block a user