-
Notifications
You must be signed in to change notification settings - Fork 137
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
54 changed files
with
4,169 additions
and
246 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,12 @@ | ||
<component name="ProjectRunConfigurationManager"> | ||
<configuration default="false" name="Armada" type="CompoundRunConfigurationType"> | ||
<toRun name="Armada Infrastructure Services" type="docker-deploy" /> | ||
<toRun name="Event Ingester" type="GoApplicationRunConfiguration" /> | ||
<toRun name="Lookout Ingester V2" type="GoApplicationRunConfiguration" /> | ||
<toRun name="LookoutV2" type="GoApplicationRunConfiguration" /> | ||
<toRun name="Executor" type="GoApplicationRunConfiguration" /> | ||
<toRun name="Server" type="GoApplicationRunConfiguration" /> | ||
<toRun name="Scheduler" type="GoApplicationRunConfiguration" /> | ||
<toRun name="Scheduler Ingester" type="GoApplicationRunConfiguration" /> | ||
<toRun name="schedulerPostgresMigration" type="GoApplicationRunConfiguration" /> | ||
<method v="2" /> | ||
</configuration> | ||
<configuration default="false" name="Armada (Pulsar Scheduler)" type="CompoundRunConfigurationType"> | ||
<toRun name="Event Ingester" type="GoApplicationRunConfiguration" /> | ||
<toRun name="Lookout Ingester V2" type="GoApplicationRunConfiguration" /> | ||
<toRun name="LookoutV2" type="GoApplicationRunConfiguration" /> | ||
<toRun name="Executor" type="GoApplicationRunConfiguration" /> | ||
<toRun name="Server" type="GoApplicationRunConfiguration" /> | ||
<toRun name="Scheduler" type="GoApplicationRunConfiguration" /> | ||
<toRun name="Scheduler Ingester" type="GoApplicationRunConfiguration" /> | ||
<toRun name="Server" type="GoApplicationRunConfiguration" /> | ||
<method v="2" /> | ||
</configuration> | ||
</component> | ||
</component> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
package main | ||
|
||
import ( | ||
"fmt" | ||
"time" | ||
|
||
log "github.com/sirupsen/logrus" | ||
"github.com/spf13/pflag" | ||
"github.com/spf13/viper" | ||
"sigs.k8s.io/yaml" | ||
|
||
"github.com/armadaproject/armada/internal/common" | ||
"github.com/armadaproject/armada/internal/common/app" | ||
"github.com/armadaproject/armada/internal/lookoutingesterv2/configuration" | ||
"github.com/armadaproject/armada/internal/lookoutingesterv2/dbloadtester" | ||
) | ||
|
||
func init() { | ||
pflag.StringSlice( | ||
"lookoutIngesterConfig", | ||
[]string{}, | ||
"Fully qualified path to application configuration file (for multiple config files repeat this arg or separate paths with commas)", | ||
) | ||
pflag.Parse() | ||
} | ||
|
||
const ReportTemplate string = ` | ||
Load Test on LookoutIngester at %s | ||
Configuration: | ||
Total Jobs Simulated: %d | ||
Total Concurrent Jobs Simulated: %d | ||
Maximum Batch of Jobs Per Queue: %d | ||
Queues in Use: %s | ||
LookoutIngester Config: | ||
%s | ||
Results: | ||
Total Load Test Duration: %s | ||
Total DB Insertion Duration: %s | ||
Number of Events Processed: %d | ||
Average DB Insertion Time Per Event: %f milliseconds | ||
Events Processed By DB Per Second: %f events | ||
` | ||
|
||
func main() { | ||
common.ConfigureLogging() | ||
common.BindCommandlineArguments() | ||
|
||
var config configuration.LookoutIngesterV2Configuration | ||
userSpecifiedConfigs := viper.GetStringSlice("lookoutIngesterConfig") | ||
common.LoadConfig(&config, "./config/lookoutingesterv2", userSpecifiedConfigs) | ||
|
||
loadtesterConfig := dbloadtester.Config{ | ||
TotalJobs: 500000, | ||
TotalConcurrentJobs: 50000, | ||
QueueSubmitBatchSize: 300, | ||
QueueNames: []string{"queue1", "queue2", "queue3"}, | ||
JobTemplateFile: "internal/lookoutingesterv2/dbloadtester/test_data.yaml", | ||
} | ||
|
||
loadtester := dbloadtester.Setup( | ||
config, | ||
loadtesterConfig, | ||
) | ||
|
||
results, err := loadtester.Run(app.CreateContextWithShutdown()) | ||
if err != nil { | ||
log.Errorf("Ingestion simulator failed: %v", err) | ||
} | ||
|
||
LIConfig, err := yaml.Marshal(config) | ||
if err != nil { | ||
log.Warn("Failed to marshal lookout ingester config for report output") | ||
} | ||
fmt.Printf( | ||
ReportTemplate, | ||
time.Now().Format("2006-01-02"), | ||
loadtesterConfig.TotalJobs, | ||
loadtesterConfig.TotalConcurrentJobs, | ||
loadtesterConfig.QueueSubmitBatchSize, | ||
loadtesterConfig.QueueNames, | ||
string(LIConfig), | ||
results.TotalTestDuration, | ||
results.TotalDBInsertionDuration, | ||
results.TotalEventsProcessed, | ||
float64(results.TotalDBInsertionDuration.Milliseconds())/float64(results.TotalEventsProcessed), | ||
float64(results.TotalEventsProcessed)/float64(results.TotalDBInsertionDuration.Seconds()), | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.