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
4c70e44c
Commit
4c70e44c
authored
4 years ago
by
Sören Henning
Browse files
Options
Downloads
Patches
Plain Diff
Cont. add FullSearch strategy
parent
34bde357
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
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
theodolite-quarkus/src/main/kotlin/theodolite/strategies/searchstrategy/FullSearch.kt
+11
-5
11 additions, 5 deletions
...kotlin/theodolite/strategies/searchstrategy/FullSearch.kt
with
11 additions
and
5 deletions
theodolite-quarkus/src/main/kotlin/theodolite/strategies/searchstrategy/FullSearch.kt
+
11
−
5
View file @
4c70e44c
...
@@ -8,18 +8,24 @@ import theodolite.util.Resource
...
@@ -8,18 +8,24 @@ import theodolite.util.Resource
private
val
logger
=
KotlinLogging
.
logger
{}
private
val
logger
=
KotlinLogging
.
logger
{}
/**
/**
* Linear-search-like implementation for determining the smallest suitable number of instances.
* [SearchStrategy] that executes experiment for provides resources in a linear-search-like fashion, but **without
* stopping** once a suitable resource amount is found.
*
* @see LinearSearch for a SearchStrategy that stops once a suitable resource amount is found.
*
*
* @param benchmarkExecutor Benchmark executor which runs the individual benchmarks.
* @param benchmarkExecutor Benchmark executor which runs the individual benchmarks.
*/
*/
class
Linear
Search
(
benchmarkExecutor
:
BenchmarkExecutor
)
:
SearchStrategy
(
benchmarkExecutor
)
{
class
Full
Search
(
benchmarkExecutor
:
BenchmarkExecutor
)
:
SearchStrategy
(
benchmarkExecutor
)
{
override
fun
findSuitableResource
(
load
:
LoadDimension
,
resources
:
List
<
Resource
>):
Resource
?
{
override
fun
findSuitableResource
(
load
:
LoadDimension
,
resources
:
List
<
Resource
>):
Resource
?
{
var
minimalSuitableResources
:
Resource
?
=
null
;
for
(
res
in
resources
)
{
for
(
res
in
resources
)
{
logger
.
info
{
"Running experiment with load '$load' and resources '$res'"
}
logger
.
info
{
"Running experiment with load '$load' and resources '$res'"
}
if
(
this
.
benchmarkExecutor
.
runExperiment
(
load
,
res
))
return
res
val
result
=
this
.
benchmarkExecutor
.
runExperiment
(
load
,
res
)
if
(
result
&&
minimalSuitableResources
!=
null
)
{
minimalSuitableResources
=
res
}
}
}
return
null
return
minimalSuitableResources
}
}
}
}
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