mirror of
https://github.com/facebook/sapling.git
synced 2024-10-05 14:28:17 +03:00
add new ods logging for bookmark fetching from phases crate
Summary: add new ods logging for bookmark fetching from phases crate This would help with investigation sevs like S344849, also having this info we can setup alerts. Reviewed By: YousefSalama Differential Revision: D46314640 fbshipit-source-id: 66e72da19ad4eb528c78d0783c297746f57cd4f1
This commit is contained in:
parent
88e493047e
commit
45565b3045
@ -30,10 +30,17 @@ use sql::mysql_async::prelude::ConvIr;
|
||||
use sql::mysql_async::prelude::FromValue;
|
||||
use sql::mysql_async::FromValueError;
|
||||
use sql::mysql_async::Value;
|
||||
use stats::define_stats;
|
||||
use stats::prelude::*;
|
||||
|
||||
use crate::errors::SqlPhasesError;
|
||||
use crate::sql_store::SqlPhasesStore;
|
||||
|
||||
define_stats! {
|
||||
prefix = "mononoke.phases";
|
||||
public_heads_fetched: timeseries(Rate, Sum),
|
||||
}
|
||||
|
||||
/// Newtype wrapper for Phase that allows us to derive SQL conversions.
|
||||
#[derive(Abomonation, Clone, Copy, PartialEq, Eq, Debug)]
|
||||
#[derive(mysql::OptTryFromRowField)]
|
||||
@ -170,6 +177,8 @@ impl SqlPhases {
|
||||
return Ok(public_cold);
|
||||
}
|
||||
|
||||
// log fetching public heads
|
||||
STATS::public_heads_fetched.add_value(1);
|
||||
let heads = (self.heads_fetcher)(ctx).await?;
|
||||
let freshly_marked = mark_reachable_as_public(ctx, self, &heads, ephemeral_derive).await?;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user