Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
asteriskperf-python-wrapper
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
s_doering
asteriskperf-python-wrapper
Commits
a26951ca
Commit
a26951ca
authored
Jul 09, 2015
by
Deathcrow
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bugfix
parent
7d7f33cd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
wrapper.py
wrapper.py
+1
-1
No files found.
wrapper.py
View file @
a26951ca
...
...
@@ -281,7 +281,7 @@ for key, i in enumerate(sender):
bandwith_file
=
open
(
args
.
tmp_folder
+
"/bw_"
+
i
[
'congestion'
]
+
"_"
+
str
(
key
),
'a'
)
# print bw for current time interval, convert to Mbps
# pay attention to seq number wrap-around
bw
=
(
int
(
line_split
[
4
],
0
)
-
last_seq
)
if
(
int
(
line_split
[
4
],
0
)
-
last_seq
)
>
0
else
(
int
(
"0xffffffff"
,
0
)
-
last_seq
+
int
(
line_split
[
4
],
0
))
bw
=
(
int
(
line_split
[
4
],
0
)
-
last_seq
)
if
(
int
(
line_split
[
4
],
0
)
-
last_seq
)
>
=
0
else
(
int
(
"0xffffffff"
,
0
)
-
last_seq
+
int
(
line_split
[
4
],
0
))
bw
=
bw
/
abs
(
float
(
line_split
[
0
])
-
last_timestamp
)
# byte/s
bw
=
bw
*
8
/
1000
/
1000
# Mbps
bandwith_file
.
write
(
" "
.
join
(
line_split
[:
3
]
+
[
str
(
bw
)]
)
+
"
\n
"
)
...
...
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