-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
[BlockSTM] Add latency counter for profiling BlockSTM #6956
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,6 +24,28 @@ pub static SPECULATIVE_ABORT_COUNT: Lazy<IntCounter> = Lazy::new(|| { | |
.unwrap() | ||
}); | ||
|
||
pub static PARALLEL_EXECUTION_SECONDS: Lazy<Histogram> = Lazy::new(|| { | ||
register_histogram!( | ||
// metric name | ||
"aptos_parallel_execution_seconds", | ||
// metric description | ||
"The time spent in seconds in parallel execution", | ||
exponential_buckets(/*start=*/ 1e-6, /*factor=*/ 2.0, /*count=*/ 30).unwrap(), | ||
) | ||
.unwrap() | ||
}); | ||
|
||
pub static RAYON_EXECUTION_SECONDS: Lazy<Histogram> = Lazy::new(|| { | ||
register_histogram!( | ||
// metric name | ||
"aptos_rayon_execution_seconds", | ||
// metric description | ||
"The time spent in seconds in rayon thread pool in parallel execution", | ||
exponential_buckets(/*start=*/ 1e-6, /*factor=*/ 2.0, /*count=*/ 30).unwrap(), | ||
) | ||
.unwrap() | ||
}); | ||
|
||
pub static VM_INIT_SECONDS: Lazy<Histogram> = Lazy::new(|| { | ||
register_histogram!( | ||
// metric name | ||
|
@@ -46,6 +68,17 @@ pub static TASK_VALIDATE_SECONDS: Lazy<Histogram> = Lazy::new(|| { | |
.unwrap() | ||
}); | ||
|
||
pub static WORK_WITH_TASK_SECONDS: Lazy<Histogram> = Lazy::new(|| { | ||
sitalkedia marked this conversation as resolved.
Show resolved
Hide resolved
|
||
register_histogram!( | ||
// metric name | ||
"aptos_execution_work_with_task_seconds", | ||
// metric description | ||
"The time spent in work task with scope call in Block STM", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. seems like most descriptions say parallel execution (or we can use Block STM or parallel / block executor everywhere) |
||
exponential_buckets(/*start=*/ 1e-6, /*factor=*/ 2.0, /*count=*/ 30).unwrap(), | ||
) | ||
.unwrap() | ||
}); | ||
|
||
pub static TASK_EXECUTE_SECONDS: Lazy<Histogram> = Lazy::new(|| { | ||
register_histogram!( | ||
// metric name | ||
|
@@ -57,6 +90,17 @@ pub static TASK_EXECUTE_SECONDS: Lazy<Histogram> = Lazy::new(|| { | |
.unwrap() | ||
}); | ||
|
||
pub static GET_NEXT_TASK_SECONDS: Lazy<Histogram> = Lazy::new(|| { | ||
register_histogram!( | ||
// metric name | ||
"aptos_execution_get_next_task_seconds", | ||
// metric description | ||
"The time spent in seconds for getting next task from the scheduler", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Block-STM scheduler (or Block Executor scheduler, or Parallel Executor / execution scheduler) |
||
exponential_buckets(/*start=*/ 1e-6, /*factor=*/ 2.0, /*count=*/ 30).unwrap(), | ||
) | ||
.unwrap() | ||
}); | ||
|
||
pub static DEPENDENCY_WAIT_SECONDS: Lazy<Histogram> = Lazy::new(|| { | ||
register_histogram!( | ||
"aptos_execution_dependency_wait", | ||
|
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.
I wonder if it helps to have all these names start with "aptos_execution", in which case we could make this one aptos_execution_seconds and the next one aptos_execution_rayon_seconds or smt similar?
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.
@gelash - The PR got auto-merged, I will sneak the renaming changes in some other PR if that's okay.