near / nearcore

Reference client for NEAR Protocol
https://near.org
GNU General Public License v3.0
2.31k stars 615 forks source link

[locust] Register FT users faster #11802

Closed aborg-dev closed 2 months ago

aborg-dev commented 2 months ago

If the users are already created, we can skip the expensive part of checking each one of them, and instead just populate the array with known accounts.

codecov[bot] commented 2 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 71.74%. Comparing base (d7e1232) to head (35fc1e3).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #11802 +/- ## ======================================= Coverage 71.74% 71.74% ======================================= Files 796 796 Lines 163004 163004 Branches 163004 163004 ======================================= + Hits 116940 116948 +8 + Misses 41003 41001 -2 + Partials 5061 5055 -6 ``` | [Flag](https://app.codecov.io/gh/near/nearcore/pull/11802/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=near) | Coverage Δ | | |---|---|---| | [backward-compatibility](https://app.codecov.io/gh/near/nearcore/pull/11802/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=near) | `0.23% <ø> (ø)` | | | [db-migration](https://app.codecov.io/gh/near/nearcore/pull/11802/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=near) | `0.23% <ø> (ø)` | | | [genesis-check](https://app.codecov.io/gh/near/nearcore/pull/11802/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=near) | `1.35% <ø> (ø)` | | | [integration-tests](https://app.codecov.io/gh/near/nearcore/pull/11802/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=near) | `37.83% <ø> (+<0.01%)` | :arrow_up: | | [linux](https://app.codecov.io/gh/near/nearcore/pull/11802/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=near) | `71.27% <ø> (+0.01%)` | :arrow_up: | | [linux-nightly](https://app.codecov.io/gh/near/nearcore/pull/11802/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=near) | `71.33% <ø> (-0.01%)` | :arrow_down: | | [macos](https://app.codecov.io/gh/near/nearcore/pull/11802/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=near) | `54.53% <ø> (+1.58%)` | :arrow_up: | | [pytests](https://app.codecov.io/gh/near/nearcore/pull/11802/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=near) | `1.58% <ø> (ø)` | | | [sanity-checks](https://app.codecov.io/gh/near/nearcore/pull/11802/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=near) | `1.38% <ø> (ø)` | | | [unittests](https://app.codecov.io/gh/near/nearcore/pull/11802/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=near) | `66.18% <ø> (-0.01%)` | :arrow_down: | | [upgradability](https://app.codecov.io/gh/near/nearcore/pull/11802/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=near) | `0.28% <ø> (ø)` | | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=near#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

aborg-dev commented 2 months ago

I'm a bit wary of the huge batch size, but the other changes definitely LGTM :)

Yeah, it's optimized for the usage of the existing snapshot (to reduce log spam). Generating one can require some tweaking of settings, but this is done quite rarely.