Skip to content

Commit

Permalink
add perf improvment to unblock
Browse files Browse the repository at this point in the history
  • Loading branch information
areshand committed Jun 18, 2024
1 parent 33cba19 commit 9a2e48f
Show file tree
Hide file tree
Showing 7 changed files with 6 additions and 39 deletions.
15 changes: 0 additions & 15 deletions Cargo.lock

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

1 change: 0 additions & 1 deletion api/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ aptos-bcs-utils = { workspace = true }
aptos-build-info = { workspace = true }
aptos-config = { workspace = true }
aptos-crypto = { workspace = true }
aptos-db-indexer = { workspace = true }
aptos-gas-schedule = { workspace = true }
aptos-global-constants = { workspace = true }
aptos-logger = { workspace = true }
Expand Down
1 change: 0 additions & 1 deletion ecosystem/indexer-grpc/indexer-grpc-fullnode/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ aptos-api = { workspace = true }
aptos-api-types = { workspace = true }
aptos-bitvec = { workspace = true }
aptos-config = { workspace = true }
aptos-db-indexer = { workspace = true }
aptos-indexer-grpc-utils = { workspace = true }
aptos-logger = { workspace = true }
aptos-mempool = { workspace = true }
Expand Down
10 changes: 1 addition & 9 deletions storage/indexer/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,27 +20,19 @@ aptos-logger = { workspace = true }
aptos-resource-viewer = { workspace = true }
aptos-rocksdb-options = { workspace = true }
aptos-schemadb = { workspace = true }
aptos-sdk = { workspace = true }
aptos-storage-interface = { workspace = true }
aptos-types = { workspace = true }
aptos-vm-genesis = { workspace = true }
bcs = { workspace = true }
byteorder = { workspace = true }
bytes = { workspace = true }
dashmap = { workspace = true }
move-core-types = { workspace = true }
proptest = { workspace = true, optional = true }
proptest-derive = { workspace = true, optional = true }
serde = { workspace = true }

[dev-dependencies]
aptos-proptest-helpers = { workspace = true }
aptos-schemadb = { workspace = true, features = ["fuzzing"] }
aptos-types = { workspace = true, features = ["fuzzing"] }
proptest = { workspace = true }
proptest-derive = { workspace = true }
rand = { workspace = true }

[features]
default = []
fuzzing = ["proptest", "proptest-derive", "aptos-types/fuzzing", "aptos-schemadb/fuzzing"]
fuzzing = ["aptos-types/fuzzing", "aptos-schemadb/fuzzing"]
7 changes: 3 additions & 4 deletions storage/indexer/src/db_indexer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -143,10 +143,9 @@ impl DBIndexer {

fn get_num_of_transactions(&self, version: Version) -> Result<u64> {
let highest_version = self.main_db_reader.get_synced_version()?;
Ok(min(
self.config.batch_size as u64,
highest_version - version,
))
// we want to include the last transaction since the iterator interface will is right exclusive.
let num_of_transaction = min(self.config.batch_size as u64, highest_version - version) + 1;
Ok(num_of_transaction)
}

pub fn process_a_batch(&self, start_version: Option<Version>) -> Result<Version> {
Expand Down
7 changes: 0 additions & 7 deletions storage/indexer_schemas/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,11 @@ rust-version = { workspace = true }

[dependencies]
anyhow = { workspace = true }
aptos-config = { workspace = true }
aptos-logger = { workspace = true }
aptos-resource-viewer = { workspace = true }
aptos-rocksdb-options = { workspace = true }
aptos-schemadb = { workspace = true }
aptos-storage-interface = { workspace = true }
aptos-types = { workspace = true }
bcs = { workspace = true }
byteorder = { workspace = true }
bytes = { workspace = true }
dashmap = { workspace = true }
move-core-types = { workspace = true }
proptest = { workspace = true, optional = true }
proptest-derive = { workspace = true, optional = true }
serde = { workspace = true }
Expand Down
4 changes: 2 additions & 2 deletions testsuite/single_node_performance.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ class RunGroupConfig:
RunGroupConfig(expected_tps=21300, key=RunGroupKey("no-op"), included_in=LAND_BLOCKING_AND_C),
RunGroupConfig(expected_tps=11500, key=RunGroupKey("no-op", module_working_set_size=1000), included_in=LAND_BLOCKING_AND_C),
RunGroupConfig(expected_tps=12800, key=RunGroupKey("coin-transfer"), included_in=LAND_BLOCKING_AND_C | Flow.REPRESENTATIVE),
RunGroupConfig(expected_tps=32817, key=RunGroupKey("coin-transfer", executor_type="native"), included_in=LAND_BLOCKING_AND_C),
RunGroupConfig(expected_tps=34500, key=RunGroupKey("coin-transfer", executor_type="native"), included_in=LAND_BLOCKING_AND_C),
RunGroupConfig(expected_tps=9000, key=RunGroupKey("account-generation"), included_in=LAND_BLOCKING_AND_C | Flow.REPRESENTATIVE),
RunGroupConfig(expected_tps=27873, key=RunGroupKey("account-generation", executor_type="native"), included_in=Flow.CONTINUOUS),
RunGroupConfig(expected_tps=18600, key=RunGroupKey("account-resource32-b"), included_in=Flow.CONTINUOUS),
Expand Down Expand Up @@ -121,7 +121,7 @@ class RunGroupConfig:
RunGroupConfig(expected_tps=12500, key=RunGroupKey("modify-global-bounded-agg-v2", module_working_set_size=50), included_in=Flow.AGG_V2),
RunGroupConfig(expected_tps=16195, key=RunGroupKey("modify-global-milestone-agg-v2"), included_in=Flow.AGG_V2 | Flow.CONTINUOUS),

RunGroupConfig(expected_tps=7900, key=RunGroupKey("resource-groups-global-write-tag1-kb"), included_in=LAND_BLOCKING_AND_C | Flow.RESOURCE_GROUPS),
RunGroupConfig(expected_tps=7920, key=RunGroupKey("resource-groups-global-write-tag1-kb"), included_in=LAND_BLOCKING_AND_C | Flow.RESOURCE_GROUPS),
RunGroupConfig(expected_tps=8000, key=RunGroupKey("resource-groups-global-write-tag1-kb", module_working_set_size=20), included_in=Flow.RESOURCE_GROUPS, waived=True),
RunGroupConfig(expected_tps=6000, key=RunGroupKey("resource-groups-global-write-and-read-tag1-kb"), included_in=Flow.CONTINUOUS | Flow.RESOURCE_GROUPS),
RunGroupConfig(expected_tps=8000, key=RunGroupKey("resource-groups-global-write-and-read-tag1-kb", module_working_set_size=20), included_in=Flow.RESOURCE_GROUPS, waived=True),
Expand Down

0 comments on commit 9a2e48f

Please sign in to comment.