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: add database analyse-gas-usage command #10240

Merged
merged 24 commits into from Nov 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
7aa1745
feat: add database analyse-gas-usage command
jancionear Nov 23, 2023
4eb31c8
Make it possible to analyse the last N blocks
jancionear Nov 23, 2023
67967f5
Implement analysing gas usage
jancionear Nov 23, 2023
202df41
Make it possible to analyse a range of block heights
jancionear Nov 23, 2023
fe6875d
Calculate the optimal split for each shard
jancionear Nov 23, 2023
b7d4709
Find 10 biggest accounts by gas usage
jancionear Nov 23, 2023
555b947
run scripts/fix_ngihtly_feature_flags.py
jancionear Nov 23, 2023
0e8c59a
Display gas amounts in TGas
jancionear Nov 24, 2023
473747f
Extract as_percentage_of to a separate function
jancionear Nov 24, 2023
2919011
fix: fix calculation of used_gas_total in GasUsageInShard::merge()
jancionear Nov 24, 2023
f087966
Remove GasUsageInShard::used_gas_total
jancionear Nov 24, 2023
f01c80e
Improve GasUsageInShard::calculate_split()
jancionear Nov 24, 2023
d168c5d
Import some things that weren't imported before
jancionear Nov 24, 2023
b9469dd
Use entry API in GasUsageInShard::add_used_gas()
jancionear Nov 24, 2023
367e8f3
Reduce nesting depth in BlockHeightRangeIterator::next()
jancionear Nov 24, 2023
c1641b2
Display more information about each split shard
jancionear Nov 24, 2023
902728c
Display the biggest account on each shard
jancionear Nov 24, 2023
81b328a
Remove type annotations that aren't strictly needed
jancionear Nov 24, 2023
9abd600
fix: left half of shard split should be less than split_account
jancionear Nov 29, 2023
a36ea54
feat: display gas usage of all accounts as the percentage of shard total
jancionear Nov 29, 2023
8d13264
feat: show gas distribution in a shard split as (left%, split_acc%, r…
jancionear Nov 29, 2023
913f1f8
fix: adjust left_accounts and right_accounts to reflect the new defin…
jancionear Nov 29, 2023
645a5a8
feat: rename split_account to boundary_account
jancionear Nov 29, 2023
95e43b9
fix: fix formatiing
jancionear Nov 29, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions tools/database/Cargo.toml
Expand Up @@ -24,6 +24,7 @@ tempfile.workspace = true

nearcore.workspace = true
near-epoch-manager.workspace = true
near-chain.workspace = true
near-chain-configs.workspace = true
near-store.workspace = true
near-primitives.workspace = true
Expand All @@ -32,13 +33,15 @@ near-primitives.workspace = true
nightly = [
"nightly_protocol",
"near-chain-configs/nightly",
"near-chain/nightly",
"near-epoch-manager/nightly",
"near-primitives/nightly",
"near-store/nightly",
"nearcore/nightly",
]
nightly_protocol = [
"near-chain-configs/nightly_protocol",
"near-chain/nightly_protocol",
"near-epoch-manager/nightly_protocol",
"near-primitives/nightly_protocol",
"near-store/nightly_protocol",
Expand Down