Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
theodolite
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
Model registry
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Sören Henning
theodolite
Commits
27df30d0
Commit
27df30d0
authored
4 years ago
by
Björn Vonheiden
Browse files
Options
Downloads
Patches
Plain Diff
Enable use case 2 in run uc py
parent
d4547b3a
No related branches found
No related tags found
2 merge requests
!42
Integerate theodolite and run uc python scripts
,
!24
run UC as python implementation
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
execution/run_uc.py
+16
-3
16 additions, 3 deletions
execution/run_uc.py
with
16 additions
and
3 deletions
execution/run_uc.py
+
16
−
3
View file @
27df30d0
...
@@ -154,18 +154,31 @@ def start_workload_generator(wg_yaml):
...
@@ -154,18 +154,31 @@ def start_workload_generator(wg_yaml):
num_sensors
=
args
.
dim_value
num_sensors
=
args
.
dim_value
wl_max_records
=
150000
wl_max_records
=
150000
# TODO: How is this calculation done?
wl_instances
=
int
(((
num_sensors
+
(
wl_max_records
-
1
))
/
wl_max_records
))
wl_instances
=
int
(((
num_sensors
+
(
wl_max_records
-
1
))
/
wl_max_records
))
# set parameters special for uc 2
if
args
.
uc_id
==
'
2
'
:
print
(
'
use uc2 stuff
'
)
num_nested_groups
=
args
.
dim_value
num_sensors
=
'
4
'
approx_num_sensors
=
int
(
num_sensors
)
**
num_nested_groups
wl_instances
=
int
(
((
approx_num_sensors
+
wl_max_records
-
1
)
/
wl_max_records
)
)
# Customize workload generator creations
# Customize workload generator creations
wg_yaml
[
'
spec
'
][
'
replicas
'
]
=
wl_instances
wg_yaml
[
'
spec
'
][
'
replicas
'
]
=
wl_instances
# TODO: acces over name of container
# TODO: acces over name of container
# Set used use case
wg_containter
=
wg_yaml
[
'
spec
'
][
'
template
'
][
'
spec
'
][
'
containers
'
][
0
]
wg_containter
=
wg_yaml
[
'
spec
'
][
'
template
'
][
'
spec
'
][
'
containers
'
][
0
]
wg_containter
[
'
image
'
]
=
'
theodolite/theodolite-uc
'
+
args
.
uc_id
+
\
wg_containter
[
'
image
'
]
=
'
theodolite/theodolite-uc
'
+
args
.
uc_id
+
\
'
-workload-generator:latest
'
'
-workload-generator:latest
'
# TODO: acces over name of attribute
# TODO: acces over name of attribute
wg_containter
[
'
env
'
][
1
][
'
value
'
]
=
str
(
num_sensors
)
# Set environment variables
wg_containter
[
'
env
'
][
2
][
'
value
'
]
=
str
(
wl_instances
)
wg_containter
[
'
env
'
][
0
][
'
value
'
]
=
str
(
num_sensors
)
wg_containter
[
'
env
'
][
1
][
'
value
'
]
=
str
(
wl_instances
)
if
args
.
uc_id
==
'
2
'
:
# Special configuration for uc2
wg_containter
[
'
env
'
][
2
][
'
value
'
]
=
str
(
num_nested_groups
)
try
:
try
:
wg_ss
=
appsApi
.
create_namespaced_deployment
(
wg_ss
=
appsApi
.
create_namespaced_deployment
(
...
...
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