Skip to content

Commit ff2a285

Browse files
committed
Swap to proto3
Benchmark remains proto2 as the .proto has defaults that will need to be adjusted.
1 parent df321fe commit ff2a285

File tree

4 files changed

+4
-33
lines changed

4 files changed

+4
-33
lines changed

compiler/src/test/proto/test.proto

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// A simple service definition for testing the protoc plugin.
2-
syntax = "proto2";
2+
syntax = "proto3";
33

44
package grpc.testing;
55

integration-testing/src/main/java/io/grpc/testing/integration/TestServiceImpl.java

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -129,10 +129,7 @@ public StreamObserver<Messages.StreamingInputCallRequest> streamingInputCall(
129129

130130
@Override
131131
public void onValue(StreamingInputCallRequest message) {
132-
Payload payload = message.getPayload();
133-
if (payload.hasBody()) {
134-
totalPayloadSize += payload.getBody().size();
135-
}
132+
totalPayloadSize += message.getPayload().getBody().size();
136133
}
137134

138135
@Override
@@ -320,8 +317,7 @@ public Queue<Chunk> toChunkQueue(StreamingOutputCallRequest request) {
320317
int offset = 0;
321318
boolean compressable = compressableResponse(request.getResponseType());
322319
for (ResponseParameters params : request.getResponseParametersList()) {
323-
int interval = params.hasIntervalUs() ? params.getIntervalUs() : 0;
324-
chunkQueue.add(new Chunk(interval, offset, params.getSize(), compressable));
320+
chunkQueue.add(new Chunk(params.getIntervalUs(), offset, params.getSize(), compressable));
325321

326322
// Increment the offset past this chunk.
327323
// Both buffers need to be circular.

integration-testing/src/main/proto/io/grpc/testing/integration/message_set.proto

Lines changed: 0 additions & 19 deletions
This file was deleted.

integration-testing/src/main/proto/io/grpc/testing/integration/messages.proto

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,10 @@
44
// Use of this source code is governed by a BSD-style
55
// license that can be found in the LICENSE file or at
66
// https://developers.google.com/open-source/licenses/bsd
7-
syntax = "proto2";
7+
syntax = "proto3";
88

99
package stubby.testing;
1010

11-
import "io/grpc/testing/integration/message_set.proto";
12-
1311
option java_package = "io.grpc.testing.integration";
1412

1513
// The type of payload that should be returned.
@@ -56,10 +54,6 @@ message SimpleResponse {
5654
}
5755

5856
message SimpleContext {
59-
// Register MessageSet extension.
60-
extend proto2.bridge.MessageSet {
61-
optional SimpleContext message_set_extension = 71139615;
62-
}
6357
optional string value = 1;
6458
}
6559

0 commit comments

Comments
 (0)