Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ z-scratch/
.scratch/

# Binary files
benchkit/cmd/benchmark/benchmark
examples/storage/storage

# Gorums generated backup files
Expand Down
3 changes: 3 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ gorums/
│ └── gengorums/ # Compiler logic + templates
├── benchkit/ # Separate module: measurement and benchmarking
│ ├── proto/ # .proto sources for the benchkit module
│ ├── benchmark/ # Gorums workloads built on benchkit
│ ├── cmd/benchmark/ # Benchmark node binary
├── examples/ # Separate module: example implementations
├── internal/ # Internal packages
├── doc/ # Documentation
Expand Down Expand Up @@ -256,6 +258,7 @@ Before making significant changes, consult:
## Performance Considerations

- Gorums is used in performance-critical distributed systems
- Benchmarking tools are available in `benchkit/benchmark/` and `benchkit/cmd/benchmark/`
- Profile before optimizing - use Go's pprof tools

## Communication with Project Maintainer
Expand Down
23 changes: 18 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,11 @@ workspace_packages := ./... ./examples/... ./benchkit/...
plugin_deps := gorums.pb.go $(static_file)
runtime_deps := internal/stream/stream.pb.go internal/stream/stream_grpc.pb.go
benchkit_deps := benchkit/benchkit.pb.go benchkit/control.pb.go benchkit/control_gorums.pb.go
benchmark_deps := $(benchkit_deps) benchkit/benchmark/benchmark.pb.go benchkit/benchmark/benchmark_gorums.pb.go

.PHONY: all dev tools bootstrapgorums installgorums benchkit test compiletests genproto benchtest bench lint deadcode modernize goplscheck
.PHONY: all dev tools bootstrapgorums installgorums benchmark benchkit test compiletests genproto benchtest bench lint deadcode modernize goplscheck

all: dev compiletests
all: dev benchmark compiletests

dev: installgorums $(runtime_deps)
@rm -f $(dev_path)/zorums*.pb.go
Expand All @@ -30,6 +31,9 @@ dev: installgorums $(runtime_deps)
--go_opt=default_api_level=API_OPAQUE \
$(zorums_proto)

benchmark: installgorums $(benchmark_deps)
@go build -C benchkit -o cmd/benchmark/benchmark ./cmd/benchmark

benchkit: installgorums $(benchkit_deps)

# The benchkit module's generated code is written back into the module root
Expand All @@ -48,6 +52,15 @@ benchkit/control_gorums.pb.go: $(bk_path)/benchkit/control.proto
@protoc -I=$(bk_proto_path) \
--gorums_out=benchkit --gorums_opt=module=$(bk_module) $<

benchkit/benchmark/benchmark.pb.go: $(bk_path)/benchmark/benchmark.proto
@protoc -I=$(bk_proto_path) \
--go_out=benchkit --go_opt=module=$(bk_module) \
--go_opt=default_api_level=API_OPAQUE $<

benchkit/benchmark/benchmark_gorums.pb.go: $(bk_path)/benchmark/benchmark.proto
@protoc -I=$(bk_proto_path) \
--gorums_out=benchkit --gorums_opt=module=$(bk_module) $<

$(static_file): $(static_files)
@cp $(static_file) $(static_file).bak
@protoc-gen-gorums --bundle=$(static_file)
Expand Down Expand Up @@ -158,12 +171,12 @@ goplscheck:
exit 1; \
fi

# Regenerate all Gorums and protobuf generated files across the repo (dev, benchkit, internal/tests, examples).
# Regenerate all Gorums and protobuf generated files across the repo (dev, benchkit, benchmark, internal/tests, examples).
# This will force regeneration even though the proto files have not changed.
genproto: installgorums dev
@echo "Regenerating all proto files (dev, benchkit, internal/tests, examples)"
@echo "Regenerating all proto files (dev, benchkit, benchmark, internal/tests, examples)"
@$(MAKE) -B -s dev
@$(MAKE) -B -s $(benchkit_deps)
@$(MAKE) -B -s $(benchmark_deps)
@$(MAKE) -B -s --no-print-directory -C ./internal/tests all
@$(MAKE) -B -s --no-print-directory -C ./examples all

Expand Down
Loading
Loading