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
d81e4226
Commit
d81e4226
authored
4 years ago
by
Björn Vonheiden
Browse files
Options
Downloads
Patches
Plain Diff
Add calling of evaluation script from the run uc py implementation
parent
042f4d03
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
+14
-9
14 additions, 9 deletions
execution/run_uc.py
with
14 additions
and
9 deletions
execution/run_uc.py
+
14
−
9
View file @
d81e4226
...
@@ -2,6 +2,7 @@ import argparse # parse arguments from cli
...
@@ -2,6 +2,7 @@ import argparse # parse arguments from cli
import
atexit
# used to clear resources at exit of program (e.g. ctrl-c)
import
atexit
# used to clear resources at exit of program (e.g. ctrl-c)
from
kubernetes
import
client
,
config
# kubernetes api
from
kubernetes
import
client
,
config
# kubernetes api
from
kubernetes.stream
import
stream
from
kubernetes.stream
import
stream
import
lag_analysis
import
logging
# logging
import
logging
# logging
from
os
import
path
# path utilities
from
os
import
path
# path utilities
import
subprocess
# execute bash commands
import
subprocess
# execute bash commands
...
@@ -20,6 +21,11 @@ def load_variables():
...
@@ -20,6 +21,11 @@ def load_variables():
global
args
global
args
print
(
'
Load CLI variables
'
)
print
(
'
Load CLI variables
'
)
parser
=
argparse
.
ArgumentParser
(
description
=
'
Run use case Programm
'
)
parser
=
argparse
.
ArgumentParser
(
description
=
'
Run use case Programm
'
)
parser
.
add_argument
(
'
--exp-id
'
,
'
-id
'
,
dest
=
'
exp_id
'
,
default
=
'
1
'
,
metavar
=
'
EXP_ID
'
,
help
=
'
ID of the experiment
'
)
parser
.
add_argument
(
'
--use-case
'
,
'
-uc
'
,
parser
.
add_argument
(
'
--use-case
'
,
'
-uc
'
,
dest
=
'
uc_id
'
,
dest
=
'
uc_id
'
,
default
=
'
1
'
,
default
=
'
1
'
,
...
@@ -285,14 +291,10 @@ def wait_execution():
...
@@ -285,14 +291,10 @@ def wait_execution():
return
return
def
run_evaluation_script
():
def
run_evaluation
():
"""
Runs the evaluation script.
"""
"""
Runs the evaluation function
"""
# TODO: implement
print
(
'
Run evaluation function
'
)
# # Run eval script
lag_analysis
.
main
(
args
.
exp_id
,
f
'
uc
{
args
.
uc_id
}
'
,
args
.
dim_value
,
args
.
instances
,
args
.
execution_minutes
)
# source ../.venv/bin/activate
# python lag_analysis.py $EXP_ID uc1 $DIM_VALUE $INSTANCES
# $EXECUTION_MINUTES
# deactivate
return
return
...
@@ -388,7 +390,7 @@ def delete_topics(topics):
...
@@ -388,7 +390,7 @@ def delete_topics(topics):
print
(
resp
)
print
(
resp
)
print
(
'
Wait for topic deletion
'
)
print
(
'
Wait for topic deletion
'
)
time
.
sleep
(
5
)
time
.
sleep
(
2
)
resp
=
stream
(
coreApi
.
connect_get_namespaced_pod_exec
,
resp
=
stream
(
coreApi
.
connect_get_namespaced_pod_exec
,
"
kafka-client
"
,
"
kafka-client
"
,
'
default
'
,
'
default
'
,
...
@@ -538,6 +540,9 @@ def main():
...
@@ -538,6 +540,9 @@ def main():
wait_execution
()
wait_execution
()
print
(
'
---------------------
'
)
print
(
'
---------------------
'
)
run_evaluation
()
print
(
'
---------------------
'
)
# Cluster is resetted with atexit method
# Cluster is resetted with atexit method
# reset_cluster(wg, app_svc, app_svc_monitor, app_jmx, app_deploy, topics)
# reset_cluster(wg, app_svc, app_svc_monitor, app_jmx, app_deploy, topics)
...
...
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