Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
Grpc
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
tci-gateway-module
Grpc
Commits
c908eb65
Commit
c908eb65
authored
10 years ago
by
Craig Tiller
Browse files
Options
Downloads
Plain Diff
:Merge branch 'qps' of github.com:ctiller/grpc into qps
parents
4cc8a172
8221e40a
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
test/cpp/qps/client_async.cc
+1
-1
1 addition, 1 deletion
test/cpp/qps/client_async.cc
test/cpp/qps/server_async.cc
+11
-9
11 additions, 9 deletions
test/cpp/qps/server_async.cc
with
12 additions
and
10 deletions
test/cpp/qps/client_async.cc
+
1
−
1
View file @
c908eb65
...
...
@@ -310,7 +310,7 @@ class AsyncStreamingClient GRPC_FINAL : public Client {
bool
ThreadFunc
(
Histogram
*
histogram
,
size_t
thread_idx
)
GRPC_OVERRIDE
{
void
*
got_tag
;
bool
ok
;
switch
(
cli_cqs_
[
thread_idx
]
->
AsyncNext
(
&
got_tag
,
&
ok
,
std
::
chrono
::
system_clock
::
now
()
+
std
::
chrono
::
seconds
(
1
1
)))
{
switch
(
cli_cqs_
[
thread_idx
]
->
AsyncNext
(
&
got_tag
,
&
ok
,
std
::
chrono
::
system_clock
::
now
()
+
std
::
chrono
::
seconds
(
1
)))
{
case
CompletionQueue
::
SHUTDOWN
:
return
false
;
case
CompletionQueue
::
TIMEOUT
:
return
true
;
case
CompletionQueue
::
GOT_EVENT
:
break
;
...
...
This diff is collapsed.
Click to expand it.
test/cpp/qps/server_async.cc
+
11
−
9
View file @
c908eb65
...
...
@@ -97,15 +97,15 @@ class AsyncQpsServerTest : public Server {
bool
ok
;
void
*
got_tag
;
while
(
srv_cq_
.
Next
(
&
got_tag
,
&
ok
))
{
ServerRpcContext
*
ctx
=
detag
(
got_tag
);
// The tag is a pointer to an RPC context to invoke
if
(
ctx
->
RunNextState
(
ok
)
==
false
)
{
// this RPC context is done, so refresh it
ServerRpcContext
*
ctx
=
detag
(
got_tag
);
// The tag is a pointer to an RPC context to invoke
if
(
ctx
->
RunNextState
(
ok
)
==
false
)
{
// this RPC context is done, so refresh it
std
::
lock_guard
<
std
::
mutex
>
g
(
shutdown_mutex_
);
if
(
!
shutdown_
)
{
ctx
->
Reset
();
}
}
}
}
return
;
}));
...
...
@@ -175,8 +175,9 @@ class AsyncQpsServerTest : public Server {
private
:
bool
finisher
(
bool
)
{
return
false
;
}
bool
invoker
(
bool
ok
)
{
if
(
!
ok
)
return
false
;
if
(
!
ok
)
{
return
false
;
}
ResponseType
response
;
...
...
@@ -230,8 +231,9 @@ class AsyncQpsServerTest : public Server {
private
:
bool
request_done
(
bool
ok
)
{
if
(
!
ok
)
return
false
;
if
(
!
ok
)
{
return
false
;
}
stream_
.
Read
(
&
req_
,
AsyncQpsServerTest
::
tag
(
this
));
next_state_
=
&
ServerRpcContextStreamingImpl
::
read_done
;
return
true
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment