mononoke: ods log when hg was generated from bonsai

Reviewed By: jsgf

Differential Revision: D15018615

fbshipit-source-id: 6e33f039ba774cb5e397f753b718fd316ea8f347
This commit is contained in:
Stanislau Hlebik 2019-04-19 14:40:46 -07:00 committed by Facebook Github Bot
parent 89ae5651a4
commit e7719effbc

View File

@ -75,6 +75,7 @@ define_stats! {
get_changeset_by_changesetid: timeseries(RATE, SUM),
get_hg_file_copy_from_blobstore: timeseries(RATE, SUM),
get_hg_from_bonsai_changeset: timeseries(RATE, SUM),
generate_hg_from_bonsai_changeset: timeseries(RATE, SUM),
get_manifest_by_nodeid: timeseries(RATE, SUM),
get_root_entry: timeseries(RATE, SUM),
get_bookmark: timeseries(RATE, SUM),
@ -1489,7 +1490,10 @@ impl BlobRepo {
let repo = self.clone();
move |cs_id| match cs_id {
Some(cs_id) => future::ok(cs_id).left_future(),
None => create_hg_from_bonsai_changeset(ctx, &repo, bcs_id).right_future(),
None => {
STATS::generate_hg_from_bonsai_changeset.add_value(1);
create_hg_from_bonsai_changeset(ctx, &repo, bcs_id).right_future()
}
}
})
}