mirror of
https://github.com/facebook/sapling.git
synced 2024-10-06 23:07:18 +03:00
store: reduce verbosity of tree fetching
Summary: Our logs are filled with this message, making it almost impossible to read, this doesn't need to be DBG1, let's reduce it to DBG5 similarly to what we do for blobs. Reviewed By: kmancini Differential Revision: D27652526 fbshipit-source-id: c61d502a9f17d8180bad857ff6c1a9033763947d
This commit is contained in:
parent
8e8aaa61d6
commit
4f999f5daf
@ -335,8 +335,18 @@ std::unique_ptr<IOBuf> HgImporter::fetchTree(
|
||||
RelativePathPiece path,
|
||||
Hash pathManifestNode) {
|
||||
// Ask the hg_import_helper script to fetch data for this tree
|
||||
XLOG(DBG1) << "fetching data for tree \"" << path << "\" at manifest node "
|
||||
<< pathManifestNode;
|
||||
static constexpr auto getNumRequestsSinceLastLog =
|
||||
[](uint64_t& treeRequestsSinceLog) {
|
||||
uint64_t numRequests = 0;
|
||||
std::swap(numRequests, treeRequestsSinceLog);
|
||||
return numRequests;
|
||||
};
|
||||
XLOG_EVERY_MS(DBG1, 1000)
|
||||
<< "fetching data for tree \"" << path << "\" at manifest node "
|
||||
<< pathManifestNode << ". "
|
||||
<< getNumRequestsSinceLastLog(treeRequestsSinceLog_)
|
||||
<< " trees fetched since last log";
|
||||
treeRequestsSinceLog_++;
|
||||
|
||||
auto requestID = sendFetchTreeRequest(
|
||||
CMD_CAT_TREE, path, pathManifestNode, "CMD_CAT_TREE");
|
||||
|
@ -265,6 +265,10 @@ class HgImporter : public Importer {
|
||||
std::shared_ptr<EdenStats> const stats_;
|
||||
ImporterOptions options_;
|
||||
uint32_t nextRequestID_{0};
|
||||
|
||||
// How many trees were fetched since the last time we logged?
|
||||
uint64_t treeRequestsSinceLog_{0};
|
||||
|
||||
/**
|
||||
* The input and output file descriptors to the helper subprocess.
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user