Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
F
flame-clmc
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor 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
flame
flame-clmc
Commits
6181c32b
Commit
6181c32b
authored
7 years ago
by
Nikolay Stanchev
Browse files
Options
Downloads
Patches
Plain Diff
[Issue #61] - added continuous 'connected' state update in the simulator
parent
9f3d3ec6
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
clmctest/monitoring/StreamingSim.py
+6
-5
6 additions, 5 deletions
clmctest/monitoring/StreamingSim.py
clmctest/monitoring/test_simresults.py
+6
-6
6 additions, 6 deletions
clmctest/monitoring/test_simresults.py
with
12 additions
and
11 deletions
clmctest/monitoring/StreamingSim.py
+
6
−
5
View file @
6181c32b
...
...
@@ -240,11 +240,12 @@ class Sim(object):
# remove requests processed off the queue
ip_endpoint
[
'
request_queue
'
]
-=
int
(
requests_processed
)
# update mpegdash_service media component state (continuously 'running')
state_stats
=
{}
state_stats
[
'
running
'
]
=
float
(
TICK_TIME
)
state_stats
[
'
avg_running
'
]
=
float
(
TICK_TIME
)
agent_db_client
.
write_points
(
lp
.
generate_mc_service_config
(
"
mpegdash_service_config
"
,
state_stats
,
sim_time
))
# update mpegdash_service media component and endpoint state (continuously 'running' and 'connected' respectively)
agent_db_client
.
write_points
(
lp
.
generate_endpoint_config
(
ip_endpoint
[
'
cpu
'
],
ip_endpoint
[
'
mem
'
],
ip_endpoint
[
'
storage
'
],
sim_time
,
**
{
'
connected
'
:
float
(
TICK_TIME
),
'
avg_connected
'
:
float
(
TICK_TIME
)}))
agent_db_client
.
write_points
(
lp
.
generate_mc_service_config
(
"
mpegdash_service_config
"
,
{
'
running
'
:
float
(
TICK_TIME
),
'
avg_running
'
:
float
(
TICK_TIME
)},
sim_time
))
sim_time
+=
TICK_TIME
...
...
This diff is collapsed.
Click to expand it.
clmctest/monitoring/test_simresults.py
+
6
−
6
View file @
6181c32b
...
...
@@ -26,17 +26,17 @@ class TestSimulation(object):
{
"
time
"
:
"
1970-01-01T00:00:00Z
"
,
"
count_RX_BYTES_PORT_M
"
:
7200
,
"
count_TX_BYTES_PORT_M
"
:
7200
}),
(
'
SELECT count(*) FROM
"
CLMCMetrics
"
.
"
autogen
"
.
"
endpoint_config
"
WHERE ipendpoint=
\'
adaptive_streaming_I1_apache1
\'
'
,
{
"
time
"
:
"
1970-01-01T00:00:00Z
"
,
"
count_unplaced
"
:
7
,
"
count_avg_unplaced
"
:
7
,
"
count_placing
"
:
7
,
"
count_avg_placing
"
:
7
,
"
count_placed
"
:
7
,
"
count_avg_placed
"
:
7
,
"
count_booting
"
:
7
,
"
count_avg_booting
"
:
7
,
"
count_booted
"
:
7
,
"
count_avg_booted
"
:
7
,
"
count_connecting
"
:
7
,
"
count_avg_connecting
"
:
7
,
"
count_connected
"
:
7
,
"
count_avg_connected
"
:
7
,
"
count_cpus
"
:
7
,
"
count_memory
"
:
7
,
"
count_storage
"
:
7
}),
{
"
time
"
:
"
1970-01-01T00:00:00Z
"
,
"
count_unplaced
"
:
360
7
,
"
count_avg_unplaced
"
:
360
7
,
"
count_placing
"
:
360
7
,
"
count_avg_placing
"
:
360
7
,
"
count_placed
"
:
360
7
,
"
count_avg_placed
"
:
360
7
,
"
count_booting
"
:
360
7
,
"
count_avg_booting
"
:
360
7
,
"
count_booted
"
:
360
7
,
"
count_avg_booted
"
:
360
7
,
"
count_connecting
"
:
360
7
,
"
count_avg_connecting
"
:
360
7
,
"
count_connected
"
:
360
7
,
"
count_avg_connected
"
:
360
7
,
"
count_cpus
"
:
360
7
,
"
count_memory
"
:
360
7
,
"
count_storage
"
:
360
7
}),
(
'
SELECT count(*) FROM
"
CLMCMetrics
"
.
"
autogen
"
.
"
endpoint_config
"
WHERE ipendpoint=
\'
adaptive_streaming_I1_apache2
\'
'
,
{
"
time
"
:
"
1970-01-01T00:00:00Z
"
,
"
count_unplaced
"
:
7
,
"
count_avg_unplaced
"
:
7
,
"
count_placing
"
:
7
,
"
count_avg_placing
"
:
7
,
"
count_placed
"
:
7
,
"
count_avg_placed
"
:
7
,
"
count_booting
"
:
7
,
"
count_avg_booting
"
:
7
,
"
count_booted
"
:
7
,
"
count_avg_booted
"
:
7
,
"
count_connecting
"
:
7
,
"
count_avg_connecting
"
:
7
,
"
count_connected
"
:
7
,
"
count_avg_connected
"
:
7
,
"
count_cpus
"
:
7
,
"
count_memory
"
:
7
,
"
count_storage
"
:
7
}),
{
"
time
"
:
"
1970-01-01T00:00:00Z
"
,
"
count_unplaced
"
:
360
7
,
"
count_avg_unplaced
"
:
360
7
,
"
count_placing
"
:
360
7
,
"
count_avg_placing
"
:
360
7
,
"
count_placed
"
:
360
7
,
"
count_avg_placed
"
:
360
7
,
"
count_booting
"
:
360
7
,
"
count_avg_booting
"
:
360
7
,
"
count_booted
"
:
360
7
,
"
count_avg_booted
"
:
360
7
,
"
count_connecting
"
:
360
7
,
"
count_avg_connecting
"
:
360
7
,
"
count_connected
"
:
360
7
,
"
count_avg_connected
"
:
360
7
,
"
count_cpus
"
:
360
7
,
"
count_memory
"
:
360
7
,
"
count_storage
"
:
360
7
}),
(
'
SELECT count(*) FROM
"
CLMCMetrics
"
.
"
autogen
"
.
"
mpegdash_service_config
"
WHERE ipendpoint=
\'
adaptive_streaming_I1_apache1
\'
'
,
{
"
time
"
:
"
1970-01-01T00:00:00Z
"
,
"
count_avg_running
"
:
3604
,
"
count_avg_starting
"
:
3604
,
"
count_avg_stopped
"
:
3604
,
"
count_avg_stopping
"
:
3604
,
"
count_running
"
:
3604
,
"
count_starting
"
:
3604
,
"
count_stopped
"
:
3604
,
"
count_stopping
"
:
3604
}),
{
"
time
"
:
"
1970-01-01T00:00:00Z
"
,
"
count_avg_running
"
:
3604
,
"
count_avg_starting
"
:
3604
,
"
count_avg_stopped
"
:
3604
,
"
count_avg_stopping
"
:
3604
,
"
count_running
"
:
3604
,
"
count_starting
"
:
3604
,
"
count_stopped
"
:
3604
,
"
count_stopping
"
:
3604
}),
(
'
SELECT count(*) FROM
"
CLMCMetrics
"
.
"
autogen
"
.
"
mpegdash_service_config
"
WHERE ipendpoint=
\'
adaptive_streaming_I1_apache2
\'
'
,
{
"
time
"
:
"
1970-01-01T00:00:00Z
"
,
"
count_avg_running
"
:
3604
,
"
count_avg_starting
"
:
3604
,
"
count_avg_stopped
"
:
3604
,
"
count_avg_stopping
"
:
3604
,
"
count_running
"
:
3604
,
"
count_starting
"
:
3604
,
"
count_stopped
"
:
3604
,
"
count_stopping
"
:
3604
}),
{
"
time
"
:
"
1970-01-01T00:00:00Z
"
,
"
count_avg_running
"
:
3604
,
"
count_avg_starting
"
:
3604
,
"
count_avg_stopped
"
:
3604
,
"
count_avg_stopping
"
:
3604
,
"
count_running
"
:
3604
,
"
count_starting
"
:
3604
,
"
count_stopped
"
:
3604
,
"
count_stopping
"
:
3604
}),
])
def
test_simulation
(
self
,
influx_db
,
query
,
expected_result
):
"""
...
...
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