Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

config: add --msPerBlock flag #164

Merged
merged 1 commit into from
May 6, 2024
Merged

config: add --msPerBlock flag #164

merged 1 commit into from
May 6, 2024

Conversation

AliceInHunterland
Copy link
Contributor

./runner.sh --nodes mixed --rpc sharp -d "Mytest" -m rate -q 50 -z 5m -t 30s --time $(TIME_PER_BLOCK)

example:

TARGETS := start.GoFourNodes10wrk start.GoFourNodes30wrk start.GoFourNodes100wrk
TIME_BLOCKS := 5000 1000 500 200 100

run-block-tests:
	@$(foreach target,$(TARGETS), \
		$(foreach time,$(TIME_BLOCKS), \
			echo "Running $(target) with time per block $(time) ms" && \
			$(MAKE) $(target) TIME_PER_BLOCK=$(time); \
		) \
	)

@AliceInHunterland AliceInHunterland changed the title config: time per block flag config: add time per block flag Apr 17, 2024
Makefile Outdated Show resolved Hide resolved
Makefile Outdated Show resolved Hide resolved
cmd/config/main.go Outdated Show resolved Hide resolved
runner.sh Outdated Show resolved Hide resolved
runner.sh Outdated Show resolved Hide resolved
runner.sh Outdated Show resolved Hide resolved
runner.sh Outdated Show resolved Hide resolved
cmd/config/main.go Outdated Show resolved Hide resolved
runner.sh Outdated Show resolved Hide resolved
cmd/config/main.go Outdated Show resolved Hide resolved
@AnnaShaleva AnnaShaleva changed the title config: add time per block flag config: add --msPerBlock flag Apr 22, 2024
Copy link
Member

@AnnaShaleva AnnaShaleva left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The main question is: there are two steps during every benchmark run: the first is node configuration files generation from YAML templates, and the second is nodes start based on the generated configuration. MsPerBlock setting is added to both these steps. Have you ensured that these two settings are consistent? What happens if I'll specify different values at these two steps?

Makefile Outdated Show resolved Hide resolved
cmd/config/main.go Outdated Show resolved Hide resolved
cmd/config/main.go Outdated Show resolved Hide resolved
runner.sh Outdated Show resolved Hide resolved
runner.sh Outdated Show resolved Hide resolved
runner.sh Outdated Show resolved Hide resolved
@AliceInHunterland
Copy link
Contributor Author

The main question is: there are two steps during every benchmark run: the first is node configuration files generation from YAML templates, and the second is nodes start based on the generated configuration. MsPerBlock setting is added to both these steps. Have you ensured that these two settings are consistent? What happens if I'll specify different values at these two steps?

Before make prepare 1000
=> Stop environment
=> Generate configurations for single-node and four-nodes networks from templates
+ cd ./cmd
+ go run ./config/ --go-template go.protocol.template.yml --go-db leveldb --sharp-template sharp.protocol.template.yml --sharp-db LevelDBStore --msPerBlock 1000
creating: 1963633258/go.protocol.template.yml
creating: 1963633258/go.protocol.template.yml
creating: 1963633258/sharp.protocol.template.yml
creating: 1963633258/sharp.protocol.template.yml
After make prepare 1000

if you specify different value after make prepare directly in config files it will use your new value. so for running test it will use values from the last step.

@AliceInHunterland AliceInHunterland force-pushed the time-per-block branch 2 times, most recently from eb8ca46 to d771154 Compare April 27, 2024 11:24
Makefile Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
runner.sh Outdated Show resolved Hide resolved
@AliceInHunterland AliceInHunterland force-pushed the time-per-block branch 2 times, most recently from 94c12d6 to 793d25a Compare May 2, 2024 10:16
Copy link
Member

@AnnaShaleva AnnaShaleva left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The logic itself LGTM, minor style fixes are left.

README.md Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
runner.sh Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
--msPerBlock flag added to runner.sh and `msPerBlock` is used in
generation config files.

Close #161

Signed-off-by: Ekaterina Pavlova <ekt@morphbits.io>
@AnnaShaleva AnnaShaleva merged commit 7ee7f71 into master May 6, 2024
8 checks passed
@AnnaShaleva AnnaShaleva deleted the time-per-block branch May 6, 2024 13:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants