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
c695066f
Commit
c695066f
authored
9 years ago
by
David Garcia Quintas
Browse files
Options
Downloads
Patches
Plain Diff
Removed redundant parameter from Reporter interface.
parent
6f61e954
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/report.cc
+4
-6
4 additions, 6 deletions
test/cpp/qps/report.cc
test/cpp/qps/report.h
+3
-6
3 additions, 6 deletions
test/cpp/qps/report.h
with
7 additions
and
12 deletions
test/cpp/qps/report.cc
+
4
−
6
View file @
c695066f
...
...
@@ -49,10 +49,9 @@ void CompositeReporter::ReportQPS(const ScenarioResult& result) const {
}
}
void
CompositeReporter
::
ReportQPSPerCore
(
const
ScenarioResult
&
result
,
const
ServerConfig
&
config
)
const
{
void
CompositeReporter
::
ReportQPSPerCore
(
const
ScenarioResult
&
result
)
const
{
for
(
size_t
i
=
0
;
i
<
reporters_
.
size
();
++
i
)
{
reporters_
[
i
]
->
ReportQPSPerCore
(
result
,
config
);
reporters_
[
i
]
->
ReportQPSPerCore
(
result
);
}
}
...
...
@@ -76,15 +75,14 @@ void GprLogReporter::ReportQPS(const ScenarioResult& result) const {
[](
ResourceUsage
u
)
{
return
u
.
wall_time
;
}));
}
void
GprLogReporter
::
ReportQPSPerCore
(
const
ScenarioResult
&
result
,
const
ServerConfig
&
server_config
)
const
{
void
GprLogReporter
::
ReportQPSPerCore
(
const
ScenarioResult
&
result
)
const
{
auto
qps
=
result
.
latencies
.
Count
()
/
average
(
result
.
client_resources
,
[](
ResourceUsage
u
)
{
return
u
.
wall_time
;
});
gpr_log
(
GPR_INFO
,
"QPS: %.1f (%.1f/server core)"
,
qps
,
qps
/
server_config
.
threads
());
qps
/
result
.
server_config
.
threads
());
}
void
GprLogReporter
::
ReportLatency
(
const
ScenarioResult
&
result
)
const
{
...
...
This diff is collapsed.
Click to expand it.
test/cpp/qps/report.h
+
3
−
6
View file @
c695066f
...
...
@@ -62,8 +62,7 @@ class Reporter {
virtual
void
ReportQPS
(
const
ScenarioResult
&
result
)
const
=
0
;
/** Reports QPS per core as (YYY/server core). */
virtual
void
ReportQPSPerCore
(
const
ScenarioResult
&
result
,
const
ServerConfig
&
config
)
const
=
0
;
virtual
void
ReportQPSPerCore
(
const
ScenarioResult
&
result
)
const
=
0
;
/** Reports latencies for the 50, 90, 95, 99 and 99.9 percentiles, in ms. */
virtual
void
ReportLatency
(
const
ScenarioResult
&
result
)
const
=
0
;
...
...
@@ -84,8 +83,7 @@ class CompositeReporter : public Reporter {
void
add
(
std
::
unique_ptr
<
Reporter
>
reporter
);
void
ReportQPS
(
const
ScenarioResult
&
result
)
const
GRPC_OVERRIDE
;
void
ReportQPSPerCore
(
const
ScenarioResult
&
result
,
const
ServerConfig
&
config
)
const
GRPC_OVERRIDE
;
void
ReportQPSPerCore
(
const
ScenarioResult
&
result
)
const
GRPC_OVERRIDE
;
void
ReportLatency
(
const
ScenarioResult
&
result
)
const
GRPC_OVERRIDE
;
void
ReportTimes
(
const
ScenarioResult
&
result
)
const
GRPC_OVERRIDE
;
...
...
@@ -100,8 +98,7 @@ class GprLogReporter : public Reporter {
private
:
void
ReportQPS
(
const
ScenarioResult
&
result
)
const
GRPC_OVERRIDE
;
void
ReportQPSPerCore
(
const
ScenarioResult
&
result
,
const
ServerConfig
&
config
)
const
GRPC_OVERRIDE
;
void
ReportQPSPerCore
(
const
ScenarioResult
&
result
)
const
GRPC_OVERRIDE
;
void
ReportLatency
(
const
ScenarioResult
&
result
)
const
GRPC_OVERRIDE
;
void
ReportTimes
(
const
ScenarioResult
&
result
)
const
GRPC_OVERRIDE
;
};
...
...
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