mirror of https://github.com/grpc/grpc-java.git
Swap to proto3
Benchmark remains proto2 as the .proto has defaults that will need to be adjusted.
This commit is contained in:
parent
df321fed73
commit
ff2a28535a
|
@ -1,5 +1,5 @@
|
|||
// A simple service definition for testing the protoc plugin.
|
||||
syntax = "proto2";
|
||||
syntax = "proto3";
|
||||
|
||||
package grpc.testing;
|
||||
|
||||
|
|
|
@ -129,10 +129,7 @@ public class TestServiceImpl implements TestServiceGrpc.TestService {
|
|||
|
||||
@Override
|
||||
public void onValue(StreamingInputCallRequest message) {
|
||||
Payload payload = message.getPayload();
|
||||
if (payload.hasBody()) {
|
||||
totalPayloadSize += payload.getBody().size();
|
||||
}
|
||||
totalPayloadSize += message.getPayload().getBody().size();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -320,8 +317,7 @@ public class TestServiceImpl implements TestServiceGrpc.TestService {
|
|||
int offset = 0;
|
||||
boolean compressable = compressableResponse(request.getResponseType());
|
||||
for (ResponseParameters params : request.getResponseParametersList()) {
|
||||
int interval = params.hasIntervalUs() ? params.getIntervalUs() : 0;
|
||||
chunkQueue.add(new Chunk(interval, offset, params.getSize(), compressable));
|
||||
chunkQueue.add(new Chunk(params.getIntervalUs(), offset, params.getSize(), compressable));
|
||||
|
||||
// Increment the offset past this chunk.
|
||||
// Both buffers need to be circular.
|
||||
|
|
|
@ -1,19 +0,0 @@
|
|||
//
|
||||
// Copyright 2014 Google Inc. All rights reserved.
|
||||
//
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file or at
|
||||
// https://developers.google.com/open-source/licenses/bsd
|
||||
syntax = "proto2";
|
||||
|
||||
package proto2.bridge;
|
||||
|
||||
option java_outer_classname = "MessageSetProtos";
|
||||
option java_multiple_files = true;
|
||||
option java_generate_equals_and_hash = true;
|
||||
|
||||
message MessageSet {
|
||||
option message_set_wire_format = true;
|
||||
extensions 4 to max;
|
||||
}
|
||||
|
|
@ -4,12 +4,10 @@
|
|||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file or at
|
||||
// https://developers.google.com/open-source/licenses/bsd
|
||||
syntax = "proto2";
|
||||
syntax = "proto3";
|
||||
|
||||
package stubby.testing;
|
||||
|
||||
import "io/grpc/testing/integration/message_set.proto";
|
||||
|
||||
option java_package = "io.grpc.testing.integration";
|
||||
|
||||
// The type of payload that should be returned.
|
||||
|
@ -56,10 +54,6 @@ message SimpleResponse {
|
|||
}
|
||||
|
||||
message SimpleContext {
|
||||
// Register MessageSet extension.
|
||||
extend proto2.bridge.MessageSet {
|
||||
optional SimpleContext message_set_extension = 71139615;
|
||||
}
|
||||
optional string value = 1;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue