-
Notifications
You must be signed in to change notification settings - Fork 10.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cronet fixes #20464
Cronet fixes #20464
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -143,8 +143,8 @@ - (void)pingPongV2APIWithRequest:(RMTStreamingOutputCallRequest *)request | |
messageCallback:^(id message) { | ||
int indexCopy; | ||
@synchronized(self) { | ||
index += 1; | ||
indexCopy = index; | ||
index += 1; | ||
} | ||
if (indexCopy < numMessages) { | ||
[call writeMessage:request]; | ||
|
@@ -181,7 +181,7 @@ - (void)testPingPongRPCWithV2API { | |
[self pingPongV2APIWithRequest:request numMessages:1000 options:options]; | ||
|
||
[self measureBlock:^{ | ||
[self pingPongV2APIWithRequest:request numMessages:10000 options:options]; | ||
[self pingPongV2APIWithRequest:request numMessages:1000 options:options]; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Could you explain a bit why we are reducing the number? Maybe in the PR description. For record. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's to reduce test run time. Takes too long with 10k messages, and we don't really get any additional benefit with more messages. I've updated the PR description. |
||
}]; | ||
} | ||
|
||
|
@@ -198,7 +198,7 @@ - (void)testPingPongRPCWithFlowControl { | |
[self pingPongV2APIWithRequest:request numMessages:1000 options:options]; | ||
|
||
[self measureBlock:^{ | ||
[self pingPongV2APIWithRequest:request numMessages:10000 options:options]; | ||
[self pingPongV2APIWithRequest:request numMessages:1000 options:options]; | ||
}]; | ||
} | ||
|
||
|
@@ -215,7 +215,7 @@ - (void)testPingPongRPCWithInterceptor { | |
[self pingPongV2APIWithRequest:request numMessages:1000 options:options]; | ||
|
||
[self measureBlock:^{ | ||
[self pingPongV2APIWithRequest:request numMessages:10000 options:options]; | ||
[self pingPongV2APIWithRequest:request numMessages:1000 options:options]; | ||
}]; | ||
} | ||
|
||
|
@@ -254,7 +254,7 @@ - (void)testPingPongRPCWithV1API { | |
id request = [RMTStreamingOutputCallRequest messageWithPayloadSize:@1 requestedResponseSize:@1]; | ||
[self pingPongV1APIWithRequest:request numMessages:1000]; | ||
[self measureBlock:^{ | ||
[self pingPongV1APIWithRequest:request numMessages:10000]; | ||
[self pingPongV1APIWithRequest:request numMessages:1000]; | ||
}]; | ||
} | ||
|
||
|
@@ -298,7 +298,7 @@ - (void)unaryRPCsWithServices:(NSArray<RMTTestService *> *)services | |
[self waitForExpectationsWithTimeout:TEST_TIMEOUT handler:nil]; | ||
} | ||
|
||
- (void)testUnaryRPC { | ||
- (void)test1MBUnaryRPC { | ||
// Workaround Apple CFStream bug | ||
if ([self isUsingCFStream]) { | ||
return; | ||
|
@@ -329,6 +329,32 @@ - (void)testUnaryRPC { | |
}]; | ||
} | ||
|
||
- (void)test1KBUnaryRPC { | ||
RMTSimpleRequest *request = [RMTSimpleRequest message]; | ||
request.responseSize = 1024; | ||
request.payload.body = [NSMutableData dataWithLength:1024]; | ||
|
||
GRPCMutableCallOptions *options = [[GRPCMutableCallOptions alloc] init]; | ||
options.transport = [[self class] transport]; | ||
options.PEMRootCertificates = [[self class] PEMRootCertificates]; | ||
options.hostNameOverride = [[self class] hostNameOverride]; | ||
|
||
// warm up | ||
[self unaryRPCsWithServices:@[ self->_service ] | ||
request:request | ||
callsPerService:1000 | ||
maxOutstandingCalls:100 | ||
callOptions:options]; | ||
|
||
[self measureBlock:^{ | ||
[self unaryRPCsWithServices:@[ self->_service ] | ||
request:request | ||
callsPerService:1000 | ||
maxOutstandingCalls:100 | ||
callOptions:options]; | ||
}]; | ||
} | ||
|
||
- (void)testMultipleChannels { | ||
NSString *port = [[[self class] host] componentsSeparatedByString:@":"][1]; | ||
int kNumAddrs = 10; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of removing it, maybe make this configurable? Sometimes netlog is useful.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.