Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
codes
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
38
Issues
38
List
Boards
Labels
Milestones
Merge Requests
8
Merge Requests
8
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
codes
codes
Commits
a762cc3d
Commit
a762cc3d
authored
Jun 08, 2018
by
Misbah Mubarak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
making payload_sz configurable for df-plus and df-dally synthetic workloads
parent
3aee6f04
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
6 deletions
+13
-6
src/network-workloads/model-net-synthetic-custom-dfly.c
src/network-workloads/model-net-synthetic-custom-dfly.c
+9
-3
src/network-workloads/model-net-synthetic-dfly-plus.c
src/network-workloads/model-net-synthetic-dfly-plus.c
+4
-3
No files found.
src/network-workloads/model-net-synthetic-custom-dfly.c
View file @
a762cc3d
...
...
@@ -16,11 +16,11 @@
#include "codes/configuration.h"
#include "codes/lp-type-lookup.h"
#define PAYLOAD_SZ 2048
static
int
net_id
=
0
;
static
int
traffic
=
1
;
static
double
arrival_time
=
1000
.
0
;
static
int
PAYLOAD_SZ
=
2048
;
/* whether to pull instead of push */
static
int
num_servers_per_rep
=
0
;
...
...
@@ -116,6 +116,7 @@ const tw_optdef app_opt [] =
TWOPT_GROUP
(
"Model net synthetic traffic "
),
TWOPT_UINT
(
"traffic"
,
traffic
,
"UNIFORM RANDOM=1, NEAREST NEIGHBOR=2 "
),
TWOPT_UINT
(
"num_messages"
,
num_msgs
,
"Number of messages to be generated per terminal "
),
TWOPT_UINT
(
"payload_sz"
,
PAYLOAD_SZ
,
"size of the message being sent "
),
TWOPT_STIME
(
"sampling-interval"
,
sampling_interval
,
"the sampling interval "
),
TWOPT_STIME
(
"sampling-end-time"
,
sampling_end_time
,
"sampling end time "
),
TWOPT_STIME
(
"arrival_time"
,
arrival_time
,
"INTER-ARRIVAL TIME"
),
...
...
@@ -181,6 +182,11 @@ static void handle_kickoff_rev_event(
if
(
b
->
c8
)
tw_rand_reverse_unif
(
lp
->
rng
);
if
(
traffic
==
RANDOM_OTHER_GROUP
)
{
tw_rand_reverse_unif
(
lp
->
rng
);
tw_rand_reverse_unif
(
lp
->
rng
);
}
model_net_event_rc2
(
lp
,
&
m
->
event_rc
);
ns
->
msg_sent_count
--
;
tw_rand_reverse_unif
(
lp
->
rng
);
...
...
@@ -340,8 +346,8 @@ static void svr_finalize(
{
ns
->
end_ts
=
tw_now
(
lp
);
printf
(
"server %llu recvd %d bytes in %f seconds, %f MiB/s sent_count %d recvd_count %d local_count %d
\n
"
,
(
unsigned
long
long
)
lp
->
gid
,
PAYLOAD_SZ
*
ns
->
msg_recvd_count
,
ns_to_s
(
ns
->
end_ts
-
ns
->
start_ts
),
((
double
)(
PAYLOAD_SZ
*
ns
->
msg_sent_count
)
/
(
double
)(
1024
*
1024
)
/
ns_to_s
(
ns
->
end_ts
-
ns
->
start_ts
)),
ns
->
msg_sent_count
,
ns
->
msg_recvd_count
,
ns
->
local_recvd_count
);
//
printf("server %llu recvd %d bytes in %f seconds, %f MiB/s sent_count %d recvd_count %d local_count %d \n", (unsigned long long)lp->gid, PAYLOAD_SZ*ns->msg_recvd_count, ns_to_s(ns->end_ts-ns->start_ts),
//
((double)(PAYLOAD_SZ*ns->msg_sent_count)/(double)(1024*1024)/ns_to_s(ns->end_ts-ns->start_ts)), ns->msg_sent_count, ns->msg_recvd_count, ns->local_recvd_count);
return
;
}
...
...
src/network-workloads/model-net-synthetic-dfly-plus.c
View file @
a762cc3d
...
...
@@ -16,10 +16,10 @@
#include "codes/configuration.h"
#include "codes/lp-type-lookup.h"
#define PAYLOAD_SZ 2048
static
int
net_id
=
0
;
static
int
traffic
=
1
;
static
int
PAYLOAD_SZ
=
2048
;
static
double
arrival_time
=
1000
.
0
;
/* whether to pull instead of push */
...
...
@@ -114,6 +114,7 @@ const tw_optdef app_opt [] =
{
TWOPT_GROUP
(
"Model net synthetic traffic "
),
TWOPT_UINT
(
"traffic"
,
traffic
,
"UNIFORM RANDOM=1, NEAREST NEIGHBOR=2 "
),
TWOPT_UINT
(
"payload_sz"
,
PAYLOAD_SZ
,
"size of the message being sent "
),
TWOPT_UINT
(
"num_messages"
,
num_msgs
,
"Number of messages to be generated per terminal "
),
TWOPT_STIME
(
"sampling-interval"
,
sampling_interval
,
"the sampling interval "
),
TWOPT_STIME
(
"sampling-end-time"
,
sampling_end_time
,
"sampling end time "
),
...
...
@@ -350,8 +351,8 @@ static void svr_finalize(
{
ns
->
end_ts
=
tw_now
(
lp
);
printf
(
"server %llu recvd %d bytes in %f seconds, %f MiB/s sent_count %d recvd_count %d local_count %d
\n
"
,
(
unsigned
long
long
)
lp
->
gid
,
PAYLOAD_SZ
*
ns
->
msg_recvd_count
,
ns_to_s
(
ns
->
end_ts
-
ns
->
start_ts
),
((
double
)(
PAYLOAD_SZ
*
ns
->
msg_sent_count
)
/
(
double
)(
1024
*
1024
)
/
ns_to_s
(
ns
->
end_ts
-
ns
->
start_ts
)),
ns
->
msg_sent_count
,
ns
->
msg_recvd_count
,
ns
->
local_recvd_count
);
//
printf("server %llu recvd %d bytes in %f seconds, %f MiB/s sent_count %d recvd_count %d local_count %d \n", (unsigned long long)lp->gid, PAYLOAD_SZ*ns->msg_recvd_count, ns_to_s(ns->end_ts-ns->start_ts),
//
((double)(PAYLOAD_SZ*ns->msg_sent_count)/(double)(1024*1024)/ns_to_s(ns->end_ts-ns->start_ts)), ns->msg_sent_count, ns->msg_recvd_count, ns->local_recvd_count);
return
;
}
...
...
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