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
a5691ef9
Commit
a5691ef9
authored
3 years ago
by
Sören Henning
Browse files
Options
Downloads
Patches
Plain Diff
Add cooldown after benchmark execution
parent
fdf759d5
No related branches found
No related tags found
3 merge requests
!159
Re-implementation of Theodolite with Kotlin/Quarkus
,
!157
Update Graal Image in CI pipeline
,
!83
WIP: Re-implementation of Theodolite with Kotlin/Quarkus
Pipeline
#2929
canceled
3 years ago
Stage: build
Stage: test
Stage: check
Stage: deploy
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
theodolite-quarkus/src/main/kotlin/theodolite/benchmark/KubernetesBenchmarkDeployment.kt
+4
-6
4 additions, 6 deletions
...lin/theodolite/benchmark/KubernetesBenchmarkDeployment.kt
with
4 additions
and
6 deletions
theodolite-quarkus/src/main/kotlin/theodolite/benchmark/KubernetesBenchmarkDeployment.kt
+
4
−
6
View file @
a5691ef9
...
...
@@ -30,7 +30,7 @@ class KubernetesBenchmarkDeployment(
private
val
kafkaController
=
TopicManager
(
this
.
kafkaConfig
)
private
val
kubernetesManager
=
K8sManager
(
client
)
private
val
LAG_EXPORTER_POD_LABEL
=
"app.kubernetes.io/name=kafka-lag-exporter"
private
val
SLEEP_AFTER_
K8S_DELETION_MS
=
10_
000L
private
val
SLEEP_AFTER_
TEARDOWN
=
5
000L
/**
* Setup a [KubernetesBenchmark] using the [TopicManager] and the [K8sManager]:
...
...
@@ -41,9 +41,7 @@ class KubernetesBenchmarkDeployment(
val
kafkaTopics
=
this
.
topics
.
filter
{
!
it
.
removeOnly
}
.
map
{
NewTopic
(
it
.
name
,
it
.
numPartitions
,
it
.
replicationFactor
)
}
kafkaController
.
createTopics
(
kafkaTopics
)
resources
.
forEach
{
kubernetesManager
.
deploy
(
it
)
}
resources
.
forEach
{
kubernetesManager
.
deploy
(
it
)
}
}
/**
...
...
@@ -56,9 +54,9 @@ class KubernetesBenchmarkDeployment(
resources
.
forEach
{
kubernetesManager
.
remove
(
it
)
}
logger
.
info
{
"Kubernetes resources deleted. Allow for short pause before continuing."
}
Thread
.
sleep
(
SLEEP_AFTER_K8S_DELETION_MS
)
kafkaController
.
removeTopics
(
this
.
topics
.
map
{
topic
->
topic
.
name
})
KafkaLagExporterRemover
(
client
).
remove
(
LAG_EXPORTER_POD_LABEL
)
logger
.
info
{
"Teardown complete. Wait $SLEEP_AFTER_TEARDOWN ms to let everything come down."
}
Thread
.
sleep
(
SLEEP_AFTER_TEARDOWN
)
}
}
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