Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
emulab
emulab-devel
Commits
ae734026
Commit
ae734026
authored
Oct 10, 2006
by
David Johnson
Browse files
time for ith block, send and recv
parent
cd2dfe1f
Changes
2
Hide whitespace changes
Inline
Side-by-side
pelab/supafly/sfreceiver.c
View file @
ae734026
...
...
@@ -83,6 +83,7 @@ int main(int argc,char **argv) {
int
bytesRead
;
int
blocksRead
=
0
;
struct
timeval
t1
;
int
block_count
=
0
;
parse_args
(
argc
,
argv
);
...
...
@@ -156,8 +157,14 @@ int main(int argc,char **argv) {
}
}
++
block_count
;
gettimeofday
(
&
t1
,
NULL
);
fprintf
(
stdout
,
"TIME %d %.4f
\n
"
,
block_count
,
t1
.
tv_sec
+
t1
.
tv_usec
/
1000000
);
fprintf
(
stdout
,
"INFO: read %d bytes (a block) at %.6f
\n
"
,
block_size
,
...
...
pelab/supafly/sfsender.c
View file @
ae734026
...
...
@@ -119,6 +119,7 @@ int main(int argc,char **argv) {
int
i
;
int
retval
;
int
bytesWritten
;
struct
timeval
tv
;
parse_args
(
argc
,
argv
);
...
...
@@ -194,6 +195,12 @@ int main(int argc,char **argv) {
}
}
gettimeofday
(
&
tv
,
NULL
);
fprintf
(
stdout
,
"TIME %d %.4f
\n
"
,
block_count
-
remaining_block_count
,
tv
.
tv_sec
+
tv
.
tv_usec
/
1000000
);
--
remaining_block_count
;
if
(
remaining_block_count
%
8
==
0
)
{
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment