mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-23 23:04:53 +00:00
Clean up database metrics, add freezer DB size (#715)
* Clean up database metrics, add freezer DB size * Address review comments
This commit is contained in:
committed by
Paul Hauner
parent
b9d00ee8b8
commit
5e7803f00b
@@ -27,6 +27,7 @@ pub fn route<T: BeaconChainTypes>(
|
||||
eth2_config: Arc<Eth2Config>,
|
||||
local_log: slog::Logger,
|
||||
db_path: PathBuf,
|
||||
freezer_db_path: PathBuf,
|
||||
) -> impl Future<Item = Response<Body>, Error = Error> {
|
||||
metrics::inc_counter(&metrics::REQUEST_COUNT);
|
||||
let timer = metrics::start_timer(&metrics::REQUEST_RESPONSE_TIME);
|
||||
@@ -143,9 +144,12 @@ pub fn route<T: BeaconChainTypes>(
|
||||
into_boxfut(spec::get_eth2_config::<T>(req, eth2_config))
|
||||
}
|
||||
|
||||
(&Method::GET, "/metrics") => {
|
||||
into_boxfut(metrics::get_prometheus::<T>(req, beacon_chain, db_path))
|
||||
}
|
||||
(&Method::GET, "/metrics") => into_boxfut(metrics::get_prometheus::<T>(
|
||||
req,
|
||||
beacon_chain,
|
||||
db_path,
|
||||
freezer_db_path,
|
||||
)),
|
||||
|
||||
_ => Box::new(futures::future::err(ApiError::NotFound(
|
||||
"Request path and/or method not found.".to_owned(),
|
||||
|
||||
Reference in New Issue
Block a user