diff options
author | Klaus Aehlig <klaus.aehlig@huawei.com> | 2024-08-02 17:10:42 +0200 |
---|---|---|
committer | Klaus Aehlig <klaus.aehlig@huawei.com> | 2024-08-02 17:34:55 +0200 |
commit | 7ffc8485306dddc24d963b7993cd66c5ebd346d6 (patch) | |
tree | 1ebd5406569b4b3a670f4a35d7548b0d3f964e4a | |
parent | abe88cb2f16865bbcb75297c525eb51fed50d563 (diff) | |
download | justbuild-7ffc8485306dddc24d963b7993cd66c5ebd346d6.tar.gz |
just: report completion of analyse earlier
... right after having successfully finished analysing the target.
As a side effect, we also get the statistics of the export targets
reported on analysis requests. As cached export targets project
artifacts to known ones, that information is highly relevant there.
-rw-r--r-- | src/buildtool/main/main.cpp | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/src/buildtool/main/main.cpp b/src/buildtool/main/main.cpp index 8f66e0d6..d62edf9f 100644 --- a/src/buildtool/main/main.cpp +++ b/src/buildtool/main/main.cpp @@ -1126,6 +1126,27 @@ auto main(int argc, char* argv[]) -> int { os << serve_errors.dump() << std::endl; } if (result) { + Logger::Log(LogLevel::Info, + "Analysed target {}", + result->id.ToShortString()); + + { + auto cached = stats.ExportsCachedCounter(); + auto served = stats.ExportsServedCounter(); + auto uncached = stats.ExportsUncachedCounter(); + auto not_eligible = stats.ExportsNotEligibleCounter(); + Logger::Log( + served + cached + uncached + not_eligible > 0 + ? LogLevel::Info + : LogLevel::Debug, + "Export targets found: {} cached, {}{} uncached, " + "{} not eligible for caching", + cached, + served > 0 ? fmt::format("{} served, ", served) : "", + uncached, + not_eligible); + } + if (arguments.analysis.graph_file) { result_map.ToFile( *arguments.analysis.graph_file, &stats, &progress); @@ -1149,27 +1170,6 @@ auto main(int argc, char* argv[]) -> int { return kExitSuccess; } #ifndef BOOTSTRAP_BUILD_TOOL - Logger::Log(LogLevel::Info, - "Analysed target {}", - result->id.ToShortString()); - - { - auto cached = stats.ExportsCachedCounter(); - auto served = stats.ExportsServedCounter(); - auto uncached = stats.ExportsUncachedCounter(); - auto not_eligible = stats.ExportsNotEligibleCounter(); - Logger::Log( - served + cached + uncached + not_eligible > 0 - ? LogLevel::Info - : LogLevel::Debug, - "Export targets found: {} cached, {}{} uncached, " - "{} not eligible for caching", - cached, - served > 0 ? fmt::format("{} served, ", served) : "", - uncached, - not_eligible); - } - ReportTaintedness(*result); auto const& [actions, blobs, trees] = result_map.ToResult(&stats, &progress); |