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
d76c04fb
Commit
d76c04fb
authored
4 years ago
by
Sören Henning
Browse files
Options
Downloads
Patches
Plain Diff
Fix configuration of threads in environment
parent
af355c1a
No related branches found
No related tags found
2 merge requests
!86
Zookeeper free workload generator
,
!84
Gitlab CI for Theodolite-Kotlin-Quarkus
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
benchmarks/workload-generator-commons/src/main/java/theodolite/commons/workloadgeneration/LoadGenerator.java
+6
-1
6 additions, 1 deletion
.../theodolite/commons/workloadgeneration/LoadGenerator.java
with
6 additions
and
1 deletion
benchmarks/workload-generator-commons/src/main/java/theodolite/commons/workloadgeneration/LoadGenerator.java
+
6
−
1
View file @
d76c04fb
...
@@ -14,6 +14,7 @@ public final class LoadGenerator {
...
@@ -14,6 +14,7 @@ public final class LoadGenerator {
private
static
final
int
NUMBER_OF_KEYS_DEFAULT
=
10
;
private
static
final
int
NUMBER_OF_KEYS_DEFAULT
=
10
;
private
static
final
int
PERIOD_MS_DEFAULT
=
1000
;
private
static
final
int
PERIOD_MS_DEFAULT
=
1000
;
private
static
final
int
VALUE_DEFAULT
=
10
;
private
static
final
int
VALUE_DEFAULT
=
10
;
private
static
final
int
THREADS_DEFAULT
=
4
;
private
static
final
String
SCHEMA_REGISTRY_URL_DEFAULT
=
"http://localhost:8081"
;
private
static
final
String
SCHEMA_REGISTRY_URL_DEFAULT
=
"http://localhost:8081"
;
private
static
final
String
KAFKA_TOPIC_DEFAULT
=
"input"
;
private
static
final
String
KAFKA_TOPIC_DEFAULT
=
"input"
;
private
static
final
String
KAFKA_BOOTSTRAP_SERVERS_DEFAULT
=
"localhost:9092"
;
// NOPMD
private
static
final
String
KAFKA_BOOTSTRAP_SERVERS_DEFAULT
=
"localhost:9092"
;
// NOPMD
...
@@ -113,6 +114,9 @@ public final class LoadGenerator {
...
@@ -113,6 +114,9 @@ public final class LoadGenerator {
final
double
value
=
Double
.
parseDouble
(
Objects
.
requireNonNullElse
(
final
double
value
=
Double
.
parseDouble
(
Objects
.
requireNonNullElse
(
System
.
getenv
(
ConfigurationKeys
.
VALUE
),
System
.
getenv
(
ConfigurationKeys
.
VALUE
),
Integer
.
toString
(
VALUE_DEFAULT
)));
Integer
.
toString
(
VALUE_DEFAULT
)));
final
int
threads
=
Integer
.
parseInt
(
Objects
.
requireNonNullElse
(
System
.
getenv
(
ConfigurationKeys
.
THREADS
),
Integer
.
toString
(
THREADS_DEFAULT
)));
final
String
kafkaBootstrapServers
=
Objects
.
requireNonNullElse
(
final
String
kafkaBootstrapServers
=
Objects
.
requireNonNullElse
(
System
.
getenv
(
ConfigurationKeys
.
KAFKA_BOOTSTRAP_SERVERS
),
System
.
getenv
(
ConfigurationKeys
.
KAFKA_BOOTSTRAP_SERVERS
),
KAFKA_BOOTSTRAP_SERVERS_DEFAULT
);
KAFKA_BOOTSTRAP_SERVERS_DEFAULT
);
...
@@ -146,7 +150,8 @@ public final class LoadGenerator {
...
@@ -146,7 +150,8 @@ public final class LoadGenerator {
kafkaInputTopic
,
kafkaInputTopic
,
schemaRegistryUrl
,
schemaRegistryUrl
,
kafkaProperties
)
kafkaProperties
)
.
forConstantValue
(
value
)));
.
forConstantValue
(
value
))
.
setThreads
(
threads
));
}
}
}
}
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