-
Notifications
You must be signed in to change notification settings - Fork 11
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
add feature 'enable_db_speed_record' #12
add feature 'enable_db_speed_record' #12
Conversation
"reth-provider/enable_opcode_metrics", | ||
"reth-stages/enable_db_speed_record", | ||
"open_performance_dashboard", | ||
] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why does enable_db_speed_record rely on other features?
crates/primitives/src/log.rs
Outdated
#[cfg(feature = "enable_db_speed_record")] | ||
impl Log { | ||
/// Calculate size of the [Log]. | ||
#[cfg(feature = "enable_db_speed_record")] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only one #[cfg(feature = "enable_db_speed_record")] is needed here
@@ -163,7 +193,7 @@ impl Future for MetricsListener { | |||
loop { | |||
let Some(event) = ready!(this.events_rx.poll_recv(cx)) else { | |||
// Channel has closed | |||
return Poll::Ready(()) | |||
return Poll::Ready(()); | |||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should format the code.
db_speed_record.write_to_db_size = u64::try_from(state.size()).unwrap(); | ||
} | ||
#[cfg(feature = "enable_db_speed_record")] | ||
let mut write_to_db_time = revm_utils::time::TimeRecorder::now(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use mininstant get time.
if !(max_block - start_block > self.external_clean_threshold || | ||
provider.tx_ref().entries::<tables::AccountsTrie>()?.is_zero()) | ||
if !(max_block - start_block > self.external_clean_threshold | ||
|| provider.tx_ref().entries::<tables::AccountsTrie>()?.is_zero()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Format the code.
crates/storage/provider/Cargo.toml
Outdated
enable_db_speed_record = [ | ||
"revm-utils", | ||
"reth-revm-primitives/enable_opcode_metrics", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A should not rely on other features
fn header_by_number_with_db_info(&self, num: BlockNumber) -> Result<(Option<Header>, u64, u64)> { | ||
let lock = self.headers.lock(); | ||
Ok((lock.values().find(|h| h.number == num).cloned(), 0, 0)) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#[cfg(feature = "enable_db_speed_record")] fn header_by_number_with_db_info(&self, num: BlockNumber) -> (Result<Option<Header>>, u64, u64) { (self.header(number), 0, 0) }
.fold(U256::ZERO, |td, h| td + h.difficulty); | ||
Ok((Some(sum), 0, 0)) | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as above
ad7ed9a
to
4adc66c
Compare
4adc66c
to
126b3f2
Compare
@@ -234,11 +266,42 @@ impl<EF: ExecutorFactory> ExecutionStage<EF> { | |||
// Write remaining changes | |||
trace!(target: "sync::stages::execution", accounts = state.accounts().len(), "Writing updated state to database"); | |||
let start = Instant::now(); | |||
|
|||
#[cfg(feature = "enable_db_speed_record")] | |||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
delete
e007b1a
into
andy/debug/performance-dashboard
update update update update add finish_after_execution_stage feature for reth node update revm update log for revm metric some update for performance-dashboard update for write_to_db log Split the get_revm_metric_record function into two add feature 'enable_execution_duration_record' (#6) * add feature 'enable_execution_duration_record' * set 'enable_execution_duration_record' feature for util mod refactor: refactoring the code of get revm metric (#8) Refactor: refactoring the code of get cachedb metric (#9) add feature 'enable_tps_gas_record' (#7) * add feature 'enable_tps_gas_record' * format and rebase code --------- Co-authored-by: anonymousGiga <cryptonymGong@gmail.com> use minstant instead of TimeRecord (#10) update for revm dependencies (#11) Enable sload percentiles (#14) support test oom th (#15) add feature 'enable_db_speed_record' (#12) * add feature 'enable_db_speed_record' * Some minor refactoring --------- Co-authored-by: anonymousGiga <cryptonymGong@gmail.com> update revm dependencies for opcode gas metric (#16) update revm dependencies refactor opcode metric (#17) close some log update dependencies update revm dependencies refactor performance dashboard (#19) * support performance dashboard * delete obsolete code --------- Co-authored-by: anonymousGiga <cryptonymGong@gmail.com> add sload duration percentile print
update update update update add finish_after_execution_stage feature for reth node update revm update log for revm metric some update for performance-dashboard update for write_to_db log Split the get_revm_metric_record function into two add feature 'enable_execution_duration_record' (#6) * add feature 'enable_execution_duration_record' * set 'enable_execution_duration_record' feature for util mod refactor: refactoring the code of get revm metric (#8) Refactor: refactoring the code of get cachedb metric (#9) add feature 'enable_tps_gas_record' (#7) * add feature 'enable_tps_gas_record' * format and rebase code --------- Co-authored-by: anonymousGiga <cryptonymGong@gmail.com> use minstant instead of TimeRecord (#10) update for revm dependencies (#11) Enable sload percentiles (#14) support test oom th (#15) add feature 'enable_db_speed_record' (#12) * add feature 'enable_db_speed_record' * Some minor refactoring --------- Co-authored-by: anonymousGiga <cryptonymGong@gmail.com> update revm dependencies for opcode gas metric (#16) update revm dependencies refactor opcode metric (#17) close some log update dependencies update revm dependencies refactor performance dashboard (#19) * support performance dashboard * delete obsolete code --------- Co-authored-by: anonymousGiga <cryptonymGong@gmail.com> add sload duration percentile print
update update update update add finish_after_execution_stage feature for reth node update revm update log for revm metric some update for performance-dashboard update for write_to_db log Split the get_revm_metric_record function into two add feature 'enable_execution_duration_record' (#6) * add feature 'enable_execution_duration_record' * set 'enable_execution_duration_record' feature for util mod refactor: refactoring the code of get revm metric (#8) Refactor: refactoring the code of get cachedb metric (#9) add feature 'enable_tps_gas_record' (#7) * add feature 'enable_tps_gas_record' * format and rebase code --------- Co-authored-by: anonymousGiga <cryptonymGong@gmail.com> use minstant instead of TimeRecord (#10) update for revm dependencies (#11) Enable sload percentiles (#14) support test oom th (#15) add feature 'enable_db_speed_record' (#12) * add feature 'enable_db_speed_record' * Some minor refactoring --------- Co-authored-by: anonymousGiga <cryptonymGong@gmail.com> update revm dependencies for opcode gas metric (#16) update revm dependencies refactor opcode metric (#17) close some log update dependencies update revm dependencies refactor performance dashboard (#19) * support performance dashboard * delete obsolete code --------- Co-authored-by: anonymousGiga <cryptonymGong@gmail.com> add sload duration percentile print
update update update update add finish_after_execution_stage feature for reth node update revm update log for revm metric some update for performance-dashboard update for write_to_db log Split the get_revm_metric_record function into two add feature 'enable_execution_duration_record' (#6) * add feature 'enable_execution_duration_record' * set 'enable_execution_duration_record' feature for util mod refactor: refactoring the code of get revm metric (#8) Refactor: refactoring the code of get cachedb metric (#9) add feature 'enable_tps_gas_record' (#7) * add feature 'enable_tps_gas_record' * format and rebase code --------- Co-authored-by: anonymousGiga <cryptonymGong@gmail.com> use minstant instead of TimeRecord (#10) update for revm dependencies (#11) Enable sload percentiles (#14) support test oom th (#15) add feature 'enable_db_speed_record' (#12) * add feature 'enable_db_speed_record' * Some minor refactoring --------- Co-authored-by: anonymousGiga <cryptonymGong@gmail.com> update revm dependencies for opcode gas metric (#16) update revm dependencies refactor opcode metric (#17) close some log update dependencies update revm dependencies refactor performance dashboard (#19) * support performance dashboard * delete obsolete code --------- Co-authored-by: anonymousGiga <cryptonymGong@gmail.com> add sload duration percentile print modify cargo default config add enable_opcode_metrics feature in EVMProcessor fix bug of caculate total_duration
add feature 'enable_db_speed_record'