Skip to content

Commit

Permalink
fix bench
Browse files Browse the repository at this point in the history
  • Loading branch information
anthdm committed Jan 15, 2024
1 parent 5a41e08 commit 92131fc
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions _bench/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,16 @@ package main
import (
"errors"
"fmt"
"github.com/anthdm/hollywood/actor"
"github.com/anthdm/hollywood/remote"
"log/slog"
"math/rand"
"os"
"runtime"
"sync"
"sync/atomic"
"time"

"github.com/anthdm/hollywood/actor"
"github.com/anthdm/hollywood/remote"
)

//go:generate protoc --proto_path=. --go_out=. --go_opt=paths=source_relative message.proto
Expand Down Expand Up @@ -98,8 +99,8 @@ func newBenchmark(engineCount, actorsPerEngine, senders int) *Benchmark {
}
func (b *Benchmark) spawnEngines() error {
for i := 0; i < b.engineCount; i++ {
r := remote.New(fmt.Sprintf("localhost:%d", 4000+i), nil)
e, err := actor.NewEngine(&actor.EngineConfig{Remote: r})
r := remote.New(fmt.Sprintf("localhost:%d", 4000+i), remote.NewConfig())
e, err := actor.NewEngine(actor.NewEngineConfig().WithRemote(r))
if err != nil {
return fmt.Errorf("failed to create engine: %w", err)
}
Expand Down

0 comments on commit 92131fc

Please sign in to comment.