Skip to content
GitLab
Menu
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
264c7be8
Commit
264c7be8
authored
Jan 19, 2006
by
Leigh B. Stoller
Browse files
Lets not worry about that last packet (of 401) being lost.
parent
c8e099aa
Changes
1
Hide whitespace changes
Inline
Side-by-side
event/linktest/linktest.pl.in
View file @
264c7be8
#!/usr/bin/perl -w -T
#
# EMULAB-COPYRIGHT
# Copyright (c) 2000-200
5
University of Utah and the Flux Group.
# Copyright (c) 2000-200
6
University of Utah and the Flux Group.
# All rights reserved.
#
...
...
@@ -566,16 +566,14 @@ sub loss_test {
my
$numerator
=
$p_hat
-
$p
;
my
$denominator
=
sqrt
(
abs
(
$p
*
(
1
-
$p_hat
)
/
$n
)
);
if
(
$edge
->
loss
==
0
)
{
if
(
$received
<
$n
)
{
####
## TODO:
if
(
$edge
->
loss
==
0
)
{
#
# Lets not worry about a single lost packet.
#
if
(
$received
<
(
$n
-
1
))
{
my
$errmsg
=
"
Unexpected loss (sent
$n
, received=
$received
)
";
&error
(
NAME_LOSS
,
$edge
,
$errmsg
);
}
# note, no logging of succesful 0-loss. (too common).
}
}
elsif
(
$denominator
==
0
)
{
my
$errmsg
=
"
No packets lost (sent
$n
, plr
"
.
$edge
->
loss
.
"
)
";
&error
(
NAME_LOSS
,
$edge
,
$errmsg
);
...
...
Write
Preview
Supports
Markdown
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