Rename large-path-warning-threshold -> warn-large-path-threshold

This commit is contained in:
Eelco Dolstra 2024-06-03 15:49:15 +02:00
parent 7f5b57d18f
commit deac00c6d0
2 changed files with 4 additions and 4 deletions

View file

@ -1263,10 +1263,10 @@ public:
)"
};
Setting<uint64_t> largePathWarningThreshold{
Setting<uint64_t> warnLargePathThreshold{
this,
std::numeric_limits<uint64_t>::max(),
"large-path-warning-threshold",
"warn-large-path-threshold",
R"(
Warn when copying a path larger than this number of bytes to the Nix store
(as determined by its NAR serialisation).

View file

@ -168,7 +168,7 @@ std::pair<StorePath, Hash> StoreDirConfig::computeStorePath(
PathFilter & filter) const
{
auto [h, size] = hashPath(path, method.getFileIngestionMethod(), hashAlgo, filter);
if (size && *size >= settings.largePathWarningThreshold)
if (size && *size >= settings.warnLargePathThreshold)
warn("hashed large path '%s' (%s)", path, renderSize(*size));
return {
makeFixedOutputPathFromCA(
@ -212,7 +212,7 @@ StorePath Store::addToStore(
});
LengthSource lengthSource(*source);
auto storePath = addToStoreFromDump(lengthSource, name, fsm, method, hashAlgo, references, repair);
if (lengthSource.total >= settings.largePathWarningThreshold)
if (lengthSource.total >= settings.warnLargePathThreshold)
warn("copied large path '%s' to the store (%s)", path, renderSize(lengthSource.total));
return storePath;
}