Skip to content

Commit

Permalink
Benchfix (#107)
Browse files Browse the repository at this point in the history
* added max size for batching messages

* default message batch size

* wip: chaos.

* Add benchmark actor and protobuf message

The update introduces a benchmark actor that receives messages and increments a message counter. It also includes the creation of a new protobuf message. The main function is updated to incorporate this benchmark actor, while providing a detailed simulation of sending messages across multiple actors distributed across different engines.

* Refactor benchmark code and add profiling

The benchmark code is refactored for better error handling and message checks. 'benchmark' function is extracted from 'main' for further testing. A new Makefile target 'bench-profile' is added for profiling. A new test file 'main_test.go' is created for benchmark testing. Corresponding instructions are added in the newly created README.md file. Also, .gitignore is updated to exclude the created test, cpu, and memory profiles.

* document how to use the interactive web interface.

* add latency measurement as well.

* bah. can't make go test ignore the new latency tests. I just commented it out. Gonna revisit latency benchmarks later.

* Update benchmark command in Makefile

The benchmark command in the Makefile has been updated to run the whole package, not just main.go

* bench subscribed to eventstream via message. that message is now private so we must use Subscribe.

---------

Co-authored-by: anthdm <[email protected]>
  • Loading branch information
perbu and anthdm authored Dec 13, 2023
1 parent 0c36559 commit 17bcc37
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion _bench/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ type monitor struct {
func (m *monitor) Receive(ctx *actor.Context) {
switch ctx.Message().(type) {
case actor.Initialized:
ctx.Engine().BroadcastEvent(&actor.EventSub{})
ctx.Engine().Subscribe(ctx.PID())
case actor.DeadLetterEvent:
deadLetters.Add(1)
}
Expand Down

0 comments on commit 17bcc37

Please sign in to comment.