Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
Actor Framework
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
cpp-libs
Actor Framework
Commits
c8fa4ed3
Commit
c8fa4ed3
authored
Nov 22, 2018
by
Dominik Charousset
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix format-nonliteral warnings
parent
2c194443
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
10 deletions
+10
-10
libcaf_core/test/inbound_path.cpp
libcaf_core/test/inbound_path.cpp
+10
-10
No files found.
libcaf_core/test/inbound_path.cpp
View file @
c8fa4ed3
...
...
@@ -30,12 +30,12 @@ using namespace caf;
namespace
{
template
<
class
...
Ts
>
void
print
(
const
char
*
format
,
Ts
...
xs
)
{
char
buf
[
200
];
snprintf
(
buf
,
200
,
format
,
xs
...);
CAF_MESSAGE
(
buf
);
}
#define PRINT(format, ...) \
{ \
char buf[200]; \
snprintf(buf, 200, format, __VA_ARGS__); \
CAF_MESSAGE(buf); \
}
struct
fixture
{
inbound_path
::
stats_t
x
;
...
...
@@ -53,11 +53,11 @@ struct fixture {
int32_t
t
=
total_time
;
int32_t
m
=
t
>
0
?
std
::
max
((
c
*
n
)
/
t
,
1
)
:
1
;
int32_t
b
=
t
>
0
?
std
::
max
((
d
*
n
)
/
t
,
1
)
:
1
;
print
(
"with a cycle C = %ldns, desied complexity D = %l
d,"
,
c
,
d
);
print
(
"number of items N = %ld, and time delta t = %l
d:"
,
n
,
t
);
print
(
"- throughput M = max(C * N / t, 1) = max(%ld * %ld / %ld, 1) = %l
d"
,
PRINT
(
"with a cycle C = %dns, desied complexity D = %
d,"
,
c
,
d
);
PRINT
(
"number of items N = %d, and time delta t = %
d:"
,
n
,
t
);
PRINT
(
"- throughput M = max(C * N / t, 1) = max(%d * %d / %d, 1) = %
d"
,
c
,
n
,
t
,
m
);
print
(
"- items/batch B = max(D * N / t, 1) = max(%ld * %ld / %ld, 1) = %l
d"
,
PRINT
(
"- items/batch B = max(D * N / t, 1) = max(%d * %d / %d, 1) = %
d"
,
d
,
n
,
t
,
b
);
auto
cr
=
x
.
calculate
(
timespan
(
c
),
timespan
(
d
));
CAF_CHECK_EQUAL
(
cr
.
items_per_batch
,
b
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment