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 17, 2024
1 parent 33cba19 commit f36feec
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 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
2 changes: 1 addition & 1 deletion 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

0 comments on commit f36feec

Please sign in to comment.