Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
W
wendelin-telecom
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Paul Graydon
wendelin-telecom
Commits
ce96be72
Commit
ce96be72
authored
Aug 14, 2024
by
Paul Graydon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ors_wendelin: Significantly optimize IP Throughput KPI process
parent
56527915
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
76 additions
and
50 deletions
+76
-50
bt5/ors_wendelin/ExtensionTemplateItem/portal_components/extension.erp5.XlteUtils.py
...emplateItem/portal_components/extension.erp5.XlteUtils.py
+2
-2
bt5/ors_wendelin/PathTemplateItem/portal_callables/DataAnalysisLine_calculateOrsKpi.py
...Item/portal_callables/DataAnalysisLine_calculateOrsKpi.py
+20
-9
bt5/ors_wendelin/PathTemplateItem/web_page_module/ors_e_utran_ip_throughput_kpi_js.js
...eItem/web_page_module/ors_e_utran_ip_throughput_kpi_js.js
+52
-37
bt5/ors_wendelin/PathTemplateItem/web_page_module/ors_e_utran_ip_throughput_kpi_js.xml
...Item/web_page_module/ors_e_utran_ip_throughput_kpi_js.xml
+2
-2
No files found.
bt5/ors_wendelin/ExtensionTemplateItem/portal_components/extension.erp5.XlteUtils.py
View file @
ce96be72
...
...
@@ -50,8 +50,8 @@ def getORSKPIValue(data):
evt
.
append
(
calc
.
tau_lo
)
x
=
calc
.
eutran_ip_throughput
()
# E-UTRAN IP Throughput
tmp
=
[]
for
i
in
x
:
tmp
.
append
((
i
[
'dl'
][
'lo'
],
i
[
'dl'
][
'hi'
],
i
[
'ul'
][
'lo'
],
i
[
'ul'
][
'hi'
]))
for
qci
,
qci_data
in
enumerate
(
x
)
:
tmp
.
append
((
qci
,
qci_data
[
'dl'
][
'lo'
],
qci_data
[
'dl'
][
'hi'
],
qci_data
[
'ul'
][
'lo'
],
qci_data
[
'ul'
][
'hi'
]))
vIPThp_qci
.
append
(
tmp
)
# evt = np.asarray([x for x in evt])
...
...
bt5/ors_wendelin/PathTemplateItem/portal_callables/DataAnalysisLine_calculateOrsKpi.py
View file @
ce96be72
...
...
@@ -54,6 +54,7 @@ e_rab_dtype = np.dtype([
e_utran_dtype
=
np
.
dtype
([
(
'evt'
,
'float'
),
(
'qci'
,
'float'
),
(
'dl_lo'
,
'float64'
),
(
'dl_hi'
,
'float64'
),
(
'ul_lo'
,
'float64'
),
...
...
@@ -65,21 +66,31 @@ if not e_rab_array:
e_rab_array
=
e_rab_data_array
.
initArray
(
shape
=
(
0
,),
dtype
=
e_rab_dtype
)
e_rab_array_data
=
[]
e_utran_array
=
e_utran_data_array
.
getArray
()
if
not
e_utran_array
:
e_utran_array
=
e_utran_data_array
.
initArray
(
shape
=
(
0
,),
dtype
=
e_utran_dtype
)
e_utran_array_data
=
[]
for
i
in
range
(
len
(
vt
)):
e_rab_array_data
.
append
((
vt
[
i
],
vInititialEPSBEstabSR
[
i
][
0
],
vInititialEPSBEstabSR
[
i
][
1
],
vAddedEPSBEstabSR
[
i
][
0
],
vAddedEPSBEstabSR
[
i
][
1
]))
for
i
in
range
(
len
(
evt
)):
for
j
in
vIPThp_qci
[
i
]:
e_utran_array_data
.
append
((
evt
[
i
],
j
[
0
],
j
[
1
],
j
[
2
],
j
[
3
]))
if
e_rab_array_data
:
e_rab_array_data
=
np
.
ndarray
((
len
(
e_rab_array_data
),
),
e_rab_dtype
,
np
.
array
(
e_rab_array_data
))
e_rab_array
.
append
(
e_rab_array_data
)
e_utran_array
=
e_utran_data_array
.
getArray
()
if
not
e_utran_array
:
e_utran_array
=
e_utran_data_array
.
initArray
(
shape
=
(
0
,),
dtype
=
e_utran_dtype
)
e_utran_array_data
=
[]
seen_qci_list
=
[]
i
=
e_utran_array
.
shape
[
0
]
-
1
qci_idx
=
1
while
(
i
>=
0
)
and
(
e_utran_array
[
i
][
qci_idx
]
not
in
seen_qci_list
):
seen_qci_list
.
append
(
e_utran_array
[
i
][
qci_idx
])
i
-=
1
for
i
in
range
(
len
(
evt
)):
for
qci_data
in
vIPThp_qci
[
i
]:
qci
=
qci_data
[
0
]
qci_data_hi
=
[
qci_data
[
2
],
qci_data
[
4
]]
if
qci
in
seen_qci_list
or
any
([
data
!=
0
for
data
in
qci_data_hi
]):
e_utran_array_data
.
append
((
evt
[
i
],
qci
,
qci_data
[
1
],
qci_data
[
2
],
qci_data
[
3
],
qci_data
[
4
]))
if
e_utran_array_data
:
e_utran_array_data
=
np
.
ndarray
((
len
(
e_utran_array_data
),
),
e_utran_dtype
,
np
.
array
(
e_utran_array_data
))
e_utran_array
.
append
(
e_utran_array_data
)
...
...
bt5/ors_wendelin/PathTemplateItem/web_page_module/ors_e_utran_ip_throughput_kpi_js.js
View file @
ce96be72
...
...
@@ -5,19 +5,7 @@
var
gadget_klass
=
rJS
(
window
);
function
getColumn
(
array
,
column
)
{
return
array
.
map
(
function
(
value
,
index
)
{
return
value
[
column
];
});
}
function
allEqual
(
array
,
value
)
{
return
array
.
every
(
function
(
current
)
{
return
current
===
value
;
});
}
function
getPlotData
(
lo
,
hi
,
date
)
{
function
getPlotData
(
raw_lo
,
raw_hi
,
raw_qci
,
raw_date
)
{
var
color
,
color_array
=
[
{
'
color
'
:
'
#1f77b4
'
},
...
...
@@ -31,16 +19,36 @@
{
'
color
'
:
'
#bcbd22
'
},
{
'
color
'
:
'
#17becf
'
}
],
length
=
lo
[
0
].
length
,
column_value
,
qci_list
=
[...
new
Set
(...
raw_qci
)],
qci_count
=
qci_list
.
length
,
data_count
=
raw_date
.
length
,
data_list
=
[],
i
;
qci
,
date
,
lo
,
hi
,
qci_idx
,
i
,
j
;
qci_list
.
sort
(
function
(
a
,
b
)
{
return
a
-
b
;
});
for
(
i
=
0
;
i
<
qci_count
;
i
+=
1
)
{
qci
=
qci_list
[
i
];
date
=
[];
lo
=
[];
hi
=
[];
for
(
j
=
0
;
j
<
data_count
;
j
+=
1
)
{
qci_idx
=
raw_qci
[
j
].
indexOf
(
qci
);
if
(
qci_idx
==
-
1
)
{
continue
;
}
for
(
i
=
0
;
i
<
length
;
i
+=
1
)
{
column_value
=
getColumn
(
hi
,
i
);
if
(
allEqual
(
column_value
,
0
))
{
continue
;
date
.
push
(
raw_date
[
j
]);
lo
.
push
(
raw_lo
[
j
][
qci_idx
]);
hi
.
push
(
raw_hi
[
j
][
qci_idx
]);
}
color
=
color_array
[
i
%
color_array
.
length
];
data_list
.
push
({
x
:
date
,
...
...
@@ -48,23 +56,23 @@
size
:
4
},
mode
:
'
lines+markers
'
,
y
:
getColumn
(
lo
,
i
)
,
y
:
lo
,
type
:
'
scatter
'
,
line
:
color
,
name
:
'
IPThp.
'
+
i
,
legendgroup
:
'
legendgroup
'
+
i
,
hovertemplate
:
'
Date: %{x}<br>
Downloa
d: %{y} Mbit/s
'
name
:
'
QCI
'
+
qc
i
,
legendgroup
:
'
legendgroup
'
+
qc
i
,
hovertemplate
:
'
Date: %{x}<br>
Link Spee
d: %{y} Mbit/s
'
});
data_list
.
push
({
x
:
date
,
mode
:
'
lines
'
,
y
:
column_value
,
y
:
hi
,
type
:
'
scatter
'
,
line
:
color
,
opacity
:
0.3
,
showlegend
:
false
,
fill
:
'
tonexty
'
,
legendgroup
:
'
legendgroup
'
+
i
,
legendgroup
:
'
legendgroup
'
+
qc
i
,
hoverinfo
:
'
none
'
});
}
...
...
@@ -86,17 +94,19 @@
i
,
download_data
,
upload_data
,
label_list
=
[
"
evt
"
,
"
dl_lo
"
,
"
dl_hi
"
,
"
ul_lo
"
,
"
ul_hi
"
];
label_list
=
[
"
evt
"
,
"
qci
"
,
"
dl_lo
"
,
"
dl_hi
"
,
"
ul_lo
"
,
"
ul_hi
"
];
return
new
RSVP
.
Queue
().
push
(
function
()
{
return
wendelin
.
getArrayRawSlice
(
gadget
,
option_dict
.
data_array_key
);
})
.
push
(
function
(
result
)
{
var
graph_data
=
nj
.
unpack
(
result
.
pick
(
null
,
label_list
)),
date
=
[],
qci
=
[],
dl_lo
=
[],
dl_hi
=
[],
ul_lo
=
[],
ul_hi
=
[],
raw_qci
,
raw_dl_lo
,
raw_dl_hi
,
raw_ul_lo
,
...
...
@@ -106,25 +116,30 @@
for
(
i
=
0
;
i
<
graph_data
.
length
;
i
+=
1
)
{
if
(
date
.
indexOf
(
graph_data
[
i
][
0
])
==
-
1
)
{
date
.
push
(
graph_data
[
i
][
0
]);
qci
.
push
(
raw_qci
);
dl_lo
.
push
(
raw_dl_lo
);
dl_hi
.
push
(
raw_dl_hi
);
ul_lo
.
push
(
raw_ul_lo
);
ul_hi
.
push
(
raw_ul_hi
);
raw_dl_lo
=
[
graph_data
[
i
][
1
]
/
1
e6
];
raw_dl_hi
=
[
graph_data
[
i
][
2
]
/
1
e6
];
raw_ul_lo
=
[
graph_data
[
i
][
3
]
/
1
e6
];
raw_ul_hi
=
[
graph_data
[
i
][
4
]
/
1
e6
];
raw_qci
=
[
graph_data
[
i
][
1
]];
raw_dl_lo
=
[
graph_data
[
i
][
2
]
/
1
e6
];
raw_dl_hi
=
[
graph_data
[
i
][
3
]
/
1
e6
];
raw_ul_lo
=
[
graph_data
[
i
][
4
]
/
1
e6
];
raw_ul_hi
=
[
graph_data
[
i
][
5
]
/
1
e6
];
}
else
{
raw_dl_lo
.
push
(
graph_data
[
i
][
1
]
/
1
e6
);
raw_dl_hi
.
push
(
graph_data
[
i
][
2
]
/
1
e6
);
raw_ul_lo
.
push
(
graph_data
[
i
][
3
]
/
1
e6
);
raw_ul_hi
.
push
(
graph_data
[
i
][
4
]
/
1
e6
);
raw_qci
.
push
(
graph_data
[
i
][
1
]);
raw_dl_lo
.
push
(
graph_data
[
i
][
2
]
/
1
e6
);
raw_dl_hi
.
push
(
graph_data
[
i
][
3
]
/
1
e6
);
raw_ul_lo
.
push
(
graph_data
[
i
][
4
]
/
1
e6
);
raw_ul_hi
.
push
(
graph_data
[
i
][
5
]
/
1
e6
);
}
}
qci
.
push
(
raw_qci
);
dl_lo
.
push
(
raw_dl_lo
);
dl_hi
.
push
(
raw_dl_hi
);
ul_lo
.
push
(
raw_ul_lo
);
ul_hi
.
push
(
raw_ul_hi
);
qci
.
shift
();
dl_lo
.
shift
();
dl_hi
.
shift
();
ul_lo
.
shift
();
...
...
@@ -132,8 +147,8 @@
date
.
forEach
(
function
(
element
,
index
)
{
date
[
index
]
=
new
Date
(
element
*
1000
);
});
download_data
=
getPlotData
(
dl_lo
,
dl_hi
,
date
);
upload_data
=
getPlotData
(
ul_lo
,
ul_hi
,
date
);
download_data
=
getPlotData
(
dl_lo
,
dl_hi
,
qci
,
date
);
upload_data
=
getPlotData
(
ul_lo
,
ul_hi
,
qci
,
date
);
Plotly
.
newPlot
(
download_link
,
download_data
,
...
...
bt5/ors_wendelin/PathTemplateItem/web_page_module/ors_e_utran_ip_throughput_kpi_js.xml
View file @
ce96be72
...
...
@@ -242,7 +242,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
101
7.12308.4841.3874
</string>
</value>
<value>
<string>
101
8.40653.46063.57975
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -262,7 +262,7 @@
</tuple>
<state>
<tuple>
<float>
17
18094024
.82
</float>
<float>
17
23640590
.82
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
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