Commit Graph

5 Commits

Author SHA1 Message Date
Mark Juggurnauth-Thomas
6b16e16fa9 blobrepo: convert to facet container
Summary:
Convert `BlobRepo` to a `facet::container`.  This will allow it to be built
from an appropriate facet factory.

This only changes the definition of the structure: we still use
`blobrepo_factory` to construct it.  The main difference is in the types
of the attributes, which change from `Arc<dyn Trait>` to
`Arc<dyn Trait + Send + Sync + 'static`>, specified by the `ArcTrait` alias
generated by the `#[facet::facet]` macro.

Reviewed By: StanislavGlebik

Differential Revision: D27169437

fbshipit-source-id: 3496b6ee2f0d1e72a36c9e9eb9bd3d0bb7beba8b
2021-03-25 07:34:49 -07:00
Alex Hornby
6e75bcc077 mononoke: add hg derived data support to benchmark_large_directory
Summary: Add ability to benchmark hg derivation

Reviewed By: krallin

Differential Revision: D26983309

fbshipit-source-id: 593f16c752610db4253e44509ffcf218dd241796
2021-03-12 02:58:53 -08:00
Mark Juggurnauth-Thomas
91358f3716 mononoke_types: use SortedVectorMap for BonsaiChangeset
Summary:
BonsaiChangesets are rarely mutated, and their maps are stored in sorted order,
so we can use `SortedVectorMap` to load them more efficiently.

In the cases where mutable maps of filechanges are needed, we can use `BTreeMap`
during the mutation and then convert them to `SortedVectorMap` to store them.

Reviewed By: mitrandir77

Differential Revision: D25615279

fbshipit-source-id: 796219c1130df5cb025952bb61002e8d2ae898f4
2021-03-11 04:28:43 -08:00
Mark Juggurnauth-Thomas
36f78eadb8 benchmarks: add benchmark_large_directory
Summary:
Add a microbenchmark for deriving data with large directories.

This benchmark creates a commit with 100k files in a single directory, and then
derives data for that commit and 10 descendant commits, each of which add,
modify and remove some files.

Reviewed By: ahornby

Differential Revision: D26947361

fbshipit-source-id: 4215f1ac806c53a112217ceb10e50cfad56f4f28
2021-03-11 04:28:42 -08:00
Mark Juggurnauth-Thomas
eb4d31cc82 benchmark: rename to benchmarks/simulated_repo
Summary: Rename this benchmark to a specific name so that we can add new benchmarks.

Differential Revision: D26947362

fbshipit-source-id: a1d060ee79781aa0ead51f284517471431418659
2021-03-11 04:28:42 -08:00