Skip to content
This repository has been archived by the owner on May 29, 2024. It is now read-only.

Commit

Permalink
[epociask/parallelized_heuristic_execution] Updated cfg in E2E tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Ethen Pociask committed Oct 12, 2023
1 parent fb6fc18 commit 5f20133
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 9 deletions.
19 changes: 12 additions & 7 deletions e2e/setup.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import (
"github.com/base-org/pessimism/internal/client"
"github.com/base-org/pessimism/internal/config"
"github.com/base-org/pessimism/internal/core"
"github.com/base-org/pessimism/internal/engine"
"github.com/base-org/pessimism/internal/logging"
"github.com/base-org/pessimism/internal/metrics"
"github.com/base-org/pessimism/internal/state"
Expand Down Expand Up @@ -210,14 +211,17 @@ func DefaultTestConfig() *config.Config {
l1PollInterval := 900
l2PollInterval := 300
maxPipelines := 10
workerCount := 4

return &config.Config{
Environment: core.Development,
BootStrapPath: "",
SystemConfig: &subsystem.Config{
MaxPipelineCount: maxPipelines,
L2PollInterval: l2PollInterval,
L1PollInterval: l1PollInterval,
AlertConfig: &alert.Config{
PagerdutyAlertEventsURL: "",
RoutingCfgPath: "",
},
EngineConfig: &engine.Config{
WorkerCount: workerCount,
},
MetricsConfig: &metrics.Config{
Enabled: false,
Expand All @@ -228,9 +232,10 @@ func DefaultTestConfig() *config.Config {
Host: "localhost",
Port: 0,
},
AlertConfig: &alert.Config{
PagerdutyAlertEventsURL: "",
RoutingCfgPath: "",
SystemConfig: &subsystem.Config{
MaxPipelineCount: maxPipelines,
L2PollInterval: l2PollInterval,
L1PollInterval: l1PollInterval,
},
}
}
Expand Down
3 changes: 1 addition & 2 deletions internal/engine/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,8 @@ type engineManager struct {

// Used to receive heuristic input from ETL subsystem
etlIngress chan core.HeuristicInput

// Used to send alerts to alerting subsystem
alertEgress chan core.Alert

// Used to send execution requests to engine worker subscribers
workerEgress chan ExecInput

Expand Down Expand Up @@ -77,6 +75,7 @@ func NewManager(ctx context.Context, cfg *Config, engine RiskEngine, addr Addres
}

// Start engine worker pool for concurrent heuristic execution
// TODO: Add validation checks for worker count
for i := 0; i < cfg.WorkerCount; i++ {
logging.WithContext(ctx).Debug("Starting engine worker routine", zap.Int("worker", i))

Expand Down

0 comments on commit 5f20133

Please sign in to comment.