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 84354c2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
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
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 84354c2

Please sign in to comment.