mirror of
https://github.com/facebook/sapling.git
synced 2024-10-09 08:18:15 +03:00
config: remove telemetry:log-object-fetch-path
Summary: Looks like we never use this, thus let's simply remove it. Differential Revision: D30454812 fbshipit-source-id: 28242a2144da4bab9d24debc1a60eeebcdcbaad5
This commit is contained in:
parent
6f1f1ba653
commit
8a6c320d1e
@ -514,21 +514,8 @@ class EdenConfig : private ConfigSettingManager {
|
||||
"",
|
||||
this};
|
||||
|
||||
/**
|
||||
* Legacy to be deleted, once all running eden's are compatible with
|
||||
* log-object-fetch-path-regex.
|
||||
* Controls which paths eden will log data fetches for when this is set (
|
||||
* if logObjectFetchPathRegex is not set). Eden will only log paths which are
|
||||
* subpaths of <checkout root>/<logObjectFetchPath>.
|
||||
*/
|
||||
ConfigSetting<std::optional<std::string>> logObjectFetchPath{
|
||||
"telemetry:log-object-fetch-path",
|
||||
std::nullopt,
|
||||
this};
|
||||
|
||||
/**
|
||||
* Controls which paths eden will log data fetches for when this is set.
|
||||
* Takes precidence over logObjectFetchPath.
|
||||
* Fetches for any paths that match the regex will be logged.
|
||||
*/
|
||||
ConfigSetting<std::optional<std::shared_ptr<RE2>>> logObjectFetchPathRegex{
|
||||
|
@ -494,11 +494,10 @@ void HgQueuedBackingStore::logBackingStoreFetch(
|
||||
if (!config_) {
|
||||
return;
|
||||
}
|
||||
auto& logFetchPath = config_->getEdenConfig()->logObjectFetchPath.getValue();
|
||||
auto& logFetchPathRegex =
|
||||
config_->getEdenConfig()->logObjectFetchPathRegex.getValue();
|
||||
// If we are not logging at least one of these instances, early return
|
||||
if (!(logFetchPath || logFetchPathRegex || isRecordingFetch_.load())) {
|
||||
if (!(logFetchPathRegex || isRecordingFetch_.load())) {
|
||||
return;
|
||||
}
|
||||
RelativePathPiece path = proxyHash.path();
|
||||
@ -512,12 +511,6 @@ void HgQueuedBackingStore::logBackingStoreFetch(
|
||||
path.stringPiece().str(), *logFetchPathRegex.value())) {
|
||||
logger_->logImport(context, path, type);
|
||||
}
|
||||
} else if (logFetchPath) {
|
||||
// TODO: remove once logFetchPathRegex is rolled out everywhere
|
||||
if (RelativePathPiece(logFetchPath.value())
|
||||
.isParentDirOf(RelativePathPiece(path))) {
|
||||
logger_->logImport(context, path, type);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user