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

feat(l1, l2, levm): make stats #1361

Open
wants to merge 14 commits into
base: main
Choose a base branch
from
Open

feat(l1, l2, levm): make stats #1361

wants to merge 14 commits into from

Conversation

ilitteri
Copy link
Contributor

@ilitteri ilitteri commented Nov 29, 2024

Motivation

We want to be able to run all the repo statistics locally with one command (make stats).

Description

  • Updates loc bin (lines of code reporter).
  • Adds stats target to the Makefile that runs:
    • Lines of code report
    • LEVM EF Tests
    • Hive simulation

Work in progress

Right now, the hive reporter needs some improvements. If you run the command make stats, it will run all and print the reports for lines of code, LEVM EF Tests, and Hive, but the Hive report is off.

Try it yourself

make stats

@ilitteri ilitteri self-assigned this Nov 29, 2024
@ilitteri ilitteri marked this pull request as ready for review December 2, 2024 23:04
@ilitteri ilitteri requested a review from a team as a code owner December 2, 2024 23:04
Makefile Outdated
@@ -105,3 +105,25 @@ clean-hive-logs: ## 🧹 Clean Hive logs

loc:
cargo run -p loc

hive-stats:
git clone --quiet --single-branch --branch master --shallow-since=$(HIVE_SHALLOW_SINCE) https://github.com/lambdaclass/hive || true
Copy link
Collaborator

@mpaulucci mpaulucci Dec 3, 2024

Choose a reason for hiding this comment

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

why don't you add a dependency to setup-hive instead of duplicating code?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You're right, I'll refactor it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done in 763d66d.

@ilitteri ilitteri requested a review from mpaulucci December 4, 2024 15:34
git checkout master && \
git fetch --shallow-since=$(HIVE_SHALLOW_SINCE) && \
git checkout --detach $(HIVE_REVISION) && go build . ;\
if [ "$(QUIET)" = "true" ]; then \
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit

    if [ "$(QUIET)" = "true" ]; then
        quiet_opt="--quiet"
    fi
    
    git checkout $quiet_opt master && \
    git fetch $quiet_opt --shallow-since="${HIVE_SHALLOW_SINCE}" && \
    git checkout $quiet_opt --detach "${HIVE_REVISION}" && \

Copy link
Collaborator

Choose a reason for hiding this comment

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

or more succint:

    quiet_opt=$([ "$(QUIET)" = "true" ] && echo "--quiet")
    git checkout $quiet_opt master && \
    git fetch $quiet_opt --shallow-since="${HIVE_SHALLOW_SINCE}" && \
    git checkout $quiet_opt --detach "${HIVE_REVISION}" && \

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
Copy link
Collaborator

Choose a reason for hiding this comment

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

you don't need this, you should be able to just use run-hive

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.

3 participants