sapling/server
Thomas Orozco 765feaf859 mononoke/context: don't track load if load limiting is not enabled
Summary:
If load limiting isn't enabled, then tracking load doens't really make sense, since we don't have a category to record it into (we end up using an empty category instead, which doesn't feel right). This patch reworks load limiting so that it all happens within a `LoadLimiter` struct, which means we won't record load at all if load limiting is not enabled. This also removes a few of string creations that were happening here and there to reproduce the same strings over and over.

The main reason I did this is because the first time you bump load, we'll create a connection to Memcache, and for some reason that seems to be pretty slow (this only seems to happen on the first connection, so this might be expected). This makes running Mononoke locally slower since the first request you make to it takes ~2 seconds. I suspect it also makes tests slower (at least those tests that don't run in a network blackhole where presumably establishing a connection fails immediately).

Reviewed By: StanislavGlebik

Differential Revision: D16762054

fbshipit-source-id: faeb07e058c63b597916b6379022435e21a13e85
2019-08-12 07:32:57 -07:00
..
context/src mononoke/context: don't track load if load limiting is not enabled 2019-08-12 07:32:57 -07:00
repo_listener/src mononoke: add filestore params to configuration 2019-07-31 11:48:18 -07:00
src mononoke: use correct flag name 2019-07-24 10:31:14 -07:00
Cargo.toml Transition fbcode Rust crates to 2018 edition 2019-06-24 13:15:17 -07:00