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
7914e62d
Commit
7914e62d
authored
9 years ago
by
vjpai
Browse files
Options
Downloads
Patches
Plain Diff
Attack of the const police.
I also added some unrequested const's
parent
7f91d420
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
test/cpp/qps/client.h
+6
-7
6 additions, 7 deletions
test/cpp/qps/client.h
test/cpp/qps/client_async.cc
+1
-1
1 addition, 1 deletion
test/cpp/qps/client_async.cc
with
7 additions
and
8 deletions
test/cpp/qps/client.h
+
6
−
7
View file @
7914e62d
...
...
@@ -200,7 +200,7 @@ class Client {
closed_loop_
=
false
;
// set up interarrival timer according to random dist
interarrival_timer_
.
init
(
*
random_dist
,
num_threads
);
auto
now
=
gpr_now
(
GPR_CLOCK_MONOTONIC
);
const
auto
now
=
gpr_now
(
GPR_CLOCK_MONOTONIC
);
for
(
size_t
i
=
0
;
i
<
num_threads
;
i
++
)
{
next_time_
.
push_back
(
gpr_time_add
(
now
,
...
...
@@ -210,7 +210,7 @@ class Client {
}
gpr_timespec
NextIssueTime
(
int
thread_idx
)
{
gpr_timespec
result
=
next_time_
[
thread_idx
];
const
gpr_timespec
result
=
next_time_
[
thread_idx
];
next_time_
[
thread_idx
]
=
gpr_time_add
(
next_time_
[
thread_idx
],
gpr_time_from_nanos
(
interarrival_timer_
.
next
(
thread_idx
),
...
...
@@ -289,7 +289,7 @@ class Client {
Histogram
*
new_stats_
;
Histogram
histogram_
;
Client
*
client_
;
size_t
idx_
;
const
size_t
idx_
;
std
::
thread
impl_
;
};
...
...
@@ -306,9 +306,8 @@ class ClientImpl : public Client {
ClientImpl
(
const
ClientConfig
&
config
,
std
::
function
<
std
::
unique_ptr
<
StubType
>
(
std
::
shared_ptr
<
Channel
>
)
>
create_stub
)
:
channels_
(
config
.
client_channels
()),
create_stub_
(
create_stub
)
{
cores_
=
LimitCores
(
config
.
core_list
().
data
(),
config
.
core_list_size
());
:
cores_
(
LimitCores
(
config
.
core_list
().
data
(),
config
.
core_list_size
())),
channels_
(
config
.
client_channels
()),
create_stub_
(
create_stub
)
{
for
(
int
i
=
0
;
i
<
config
.
client_channels
();
i
++
)
{
channels_
[
i
].
init
(
config
.
server_targets
(
i
%
config
.
server_targets_size
()),
config
,
create_stub_
);
...
...
@@ -320,7 +319,7 @@ class ClientImpl : public Client {
virtual
~
ClientImpl
()
{}
protected
:
int
cores_
;
const
int
cores_
;
RequestType
request_
;
class
ClientChannelInfo
{
...
...
This diff is collapsed.
Click to expand it.
test/cpp/qps/client_async.cc
+
1
−
1
View file @
7914e62d
...
...
@@ -222,7 +222,7 @@ class AsyncClient : public ClientImpl<StubType, RequestType> {
}
protected
:
int
num_async_threads_
;
const
int
num_async_threads_
;
private
:
int
NumThreads
(
const
ClientConfig
&
config
)
{
...
...
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