-
Notifications
You must be signed in to change notification settings - Fork 29
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
feat(l1, l2, levm): make stats
#1361
Open
ilitteri
wants to merge
14
commits into
main
Choose a base branch
from
make_stats
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+230
−134
Open
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
020935f
Update loc reporter
ilitteri 0a58f7b
Add `make stats` cmd
ilitteri b75f2b5
Merge branch 'main' of github.com:lambdaclass/lambda_ethereum_rust in…
ilitteri 4e4b612
Fix bad merge conflict solving
ilitteri 34505fe
Fix
ilitteri db03fab
Finish hive report printing
ilitteri c84f767
Merge branch 'main' into make_stats
ilitteri ab824f1
Merge branch 'main' into make_stats
ilitteri 1aa871c
Merge branch 'main' into make_stats
ilitteri 05f5fe9
Make target depend on downloading evm ef tests
jrchatruc 763d66d
Refactored `make stats` and deps
ilitteri fd293fc
Merge branch 'main' into make_stats
ilitteri ad820df
Merge branch 'main' into make_stats
ilitteri 89bd27a
Merge branch 'main' into make_stats
ilitteri File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -76,16 +76,29 @@ HIVE_REVISION := f220e0c55fb222aaaffdf17d66aa0537cd16a67a | |
# the whole history by making it shallow since a given date (one day before our | ||
# target revision). | ||
HIVE_SHALLOW_SINCE := 2024-09-02 | ||
QUIET ?= false | ||
hive: | ||
git clone --single-branch --branch master --shallow-since=$(HIVE_SHALLOW_SINCE) https://github.com/lambdaclass/hive | ||
cd hive && git checkout --detach $(HIVE_REVISION) && go build . | ||
if [ "$(QUIET)" = "true" ]; then \ | ||
git clone --quiet --single-branch --branch master --shallow-since=$(HIVE_SHALLOW_SINCE) https://github.com/lambdaclass/hive && \ | ||
cd hive && git checkout --quiet --detach $(HIVE_REVISION) && go build .; \ | ||
else \ | ||
git clone --single-branch --branch master --shallow-since=$(HIVE_SHALLOW_SINCE) https://github.com/lambdaclass/hive && \ | ||
cd hive && git checkout --detach $(HIVE_REVISION) && go build .; \ | ||
fi | ||
|
||
setup-hive: hive ## 🐝 Set up Hive testing framework | ||
if [ "$$(cd hive && git rev-parse HEAD)" != "$(HIVE_REVISION)" ]; then \ | ||
cd hive && \ | ||
git checkout master && \ | ||
git fetch --shallow-since=$(HIVE_SHALLOW_SINCE) && \ | ||
git checkout --detach $(HIVE_REVISION) && go build . ;\ | ||
if [ "$(QUIET)" = "true" ]; then \ | ||
cd hive && \ | ||
git checkout --quiet master && \ | ||
git fetch --quiet --shallow-since=$(HIVE_SHALLOW_SINCE) && \ | ||
git checkout --quiet --detach $(HIVE_REVISION) && go build .;\ | ||
else \ | ||
cd hive && \ | ||
git checkout master && \ | ||
git fetch --shallow-since=$(HIVE_SHALLOW_SINCE) && \ | ||
git checkout --detach $(HIVE_REVISION) && go build .;\ | ||
fi \ | ||
fi | ||
|
||
TEST_PATTERN ?= / | ||
|
@@ -95,7 +108,10 @@ TEST_PATTERN ?= / | |
# For example, to run the rpc-compat suites for eth_chainId & eth_blockNumber you should run: | ||
# `make run-hive SIMULATION=ethereum/rpc-compat TEST_PATTERN="/eth_chainId|eth_blockNumber"` | ||
run-hive: build-image setup-hive ## 🧪 Run Hive testing suite | ||
cd hive && ./hive --sim $(SIMULATION) --client ethrex --sim.limit "$(TEST_PATTERN)" | ||
cd hive && ./hive --client ethrex --sim $(SIMULATION) --sim.limit "$(TEST_PATTERN)" | ||
|
||
run-hive-all: build-image setup-hive ## 🧪 Run all Hive testing suites | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. you don't need this, you should be able to just use |
||
cd hive && ./hive --client ethrex --sim $(SIMULATION) --sim.parallelism 4 | ||
|
||
run-hive-debug: build-image setup-hive ## 🐞 Run Hive testing suite in debug mode | ||
cd hive && ./hive --sim $(SIMULATION) --client ethrex --sim.limit "$(TEST_PATTERN)" --docker.output | ||
|
@@ -105,3 +121,27 @@ clean-hive-logs: ## 🧹 Clean Hive logs | |
|
||
loc: | ||
cargo run -p loc | ||
|
||
loc-stats: | ||
if [ "$(QUIET)" = "true" ]; then \ | ||
cargo run --quiet -p loc -- --summary;\ | ||
else \ | ||
cargo run -p loc -- --summary;\ | ||
fi | ||
|
||
|
||
hive-stats: | ||
make hive QUIET=true | ||
make setup-hive QUIET=true | ||
rm -rf hive/workspace $(FILE_NAME)_logs | ||
make run-hive-all SIMULATION=ethereum/rpc-compat || exit 0 | ||
make run-hive-all SIMULATION=devp2p || exit 0 | ||
make run-hive-all SIMULATION=ethereum/engine || exit 0 | ||
make run-hive-all SIMULATION=ethereum/sync || exit 0 | ||
|
||
stats: | ||
make loc-stats QUIET=true && echo | ||
cd crates/vm/levm && make download-evm-ef-tests | ||
cd crates/vm/levm && make run-evm-ef-tests QUIET=true && echo | ||
make hive-stats | ||
cargo run --quiet --release -p hive_report |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
or more succint: