Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
sbws
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
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
juga
sbws
Commits
e8786085
Commit
e8786085
authored
5 years ago
by
juga
Browse files
Options
Downloads
Plain Diff
Merge branch 'bug30747_11' into maint-1.1
parents
63378b41
5dc7d5c6
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
sbws/lib/v3bwfile.py
+15
-5
15 additions, 5 deletions
sbws/lib/v3bwfile.py
with
15 additions
and
5 deletions
sbws/lib/v3bwfile.py
+
15
−
5
View file @
e8786085
...
...
@@ -1241,14 +1241,24 @@ class V3BWFile(object):
for
l
in
bw_lines_tf
:
# Because earlier versions did not store this values, check first
# they exists. Do not report any error, since they will be stored
if
not
(
l
.
desc_bw_obs_last
or
l
.
desc_bw_obs_mean
and
l
.
desc_bw_avg
):
log
.
debug
(
"
Skipping %s from scaling, because there w
ere
no
t
"
"
descriptor bandwidth
s
.
"
,
l
.
nick
)
if
not
(
l
.
desc_bw_avg
):
log
.
debug
(
"
Skipping %s from scaling, because there w
as
no
"
"
descriptor
average
bandwidth.
"
,
l
.
nick
)
continue
if
desc_bw_obs_type
==
TORFLOW_OBS_LAST
:
desc_bw_obs
=
l
.
desc_bw_obs_last
if
l
.
desc_bw_obs_last
:
desc_bw_obs
=
l
.
desc_bw_obs_last
else
:
log
.
debug
(
"
Skipping %s from scaling, because there was no
"
"
last descriptor observed bandwidth.
"
,
l
.
nick
)
continue
elif
desc_bw_obs_type
==
TORFLOW_OBS_MEAN
:
desc_bw_obs
=
l
.
desc_bw_obs_mean
if
l
.
desc_bw_obs_mean
:
desc_bw_obs
=
l
.
desc_bw_obs_mean
else
:
log
.
debug
(
"
Skipping %s from scaling, because there was no
"
"
mean descriptor observed bandwidth.
"
,
l
.
nick
)
continue
# Excerpt from bandwidth-file-spec.txt section 2.3
# A relay's MaxAdvertisedBandwidth limits the bandwidth-avg in its
# descriptor.
...
...
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