summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/other_tools/just_mr/cli.hpp1
-rw-r--r--src/other_tools/just_mr/launch.cpp11
-rw-r--r--src/other_tools/just_mr/rc.cpp6
3 files changed, 18 insertions, 0 deletions
diff --git a/src/other_tools/just_mr/cli.hpp b/src/other_tools/just_mr/cli.hpp
index dd1586a4..d8ad0366 100644
--- a/src/other_tools/just_mr/cli.hpp
+++ b/src/other_tools/just_mr/cli.hpp
@@ -97,6 +97,7 @@ struct InvocationLogArguments {
std::optional<std::string> metadata{std::nullopt};
std::optional<std::string> graph_file{std::nullopt};
std::optional<std::string> graph_file_plain{std::nullopt};
+ std::optional<std::string> dump_artifacts{std::nullopt};
std::optional<std::string> profile{std::nullopt};
};
diff --git a/src/other_tools/just_mr/launch.cpp b/src/other_tools/just_mr/launch.cpp
index cb0f70d2..7d71da9a 100644
--- a/src/other_tools/just_mr/launch.cpp
+++ b/src/other_tools/just_mr/launch.cpp
@@ -324,6 +324,17 @@ auto CallJust(std::optional<std::filesystem::path> const& config_file,
cmd.emplace_back("--dump-plain-graph");
cmd.emplace_back(*log_dir / *invocation_log.graph_file_plain);
}
+ if (invocation_log.dump_artifacts) {
+ if (not IsValidFileName(*invocation_log.dump_artifacts)) {
+ Logger::Log(
+ LogLevel::Error,
+ "Invalid file name for option --dump-artifacts: {}",
+ nlohmann::json(*invocation_log.dump_artifacts).dump());
+ std::exit(kExitClargsError);
+ }
+ cmd.emplace_back("--dump-artifacts");
+ cmd.emplace_back(*log_dir / *invocation_log.dump_artifacts);
+ }
if (invocation_log.profile) {
if (not IsValidFileName(*invocation_log.profile)) {
Logger::Log(LogLevel::Error,
diff --git a/src/other_tools/just_mr/rc.cpp b/src/other_tools/just_mr/rc.cpp
index 5baf302c..51813dfb 100644
--- a/src/other_tools/just_mr/rc.cpp
+++ b/src/other_tools/just_mr/rc.cpp
@@ -619,6 +619,12 @@ namespace {
if (graph_file_plain->IsString()) {
clargs->invocation_log.graph_file = graph_file_plain->String();
}
+ auto dump_artifacts =
+ invocation_log->Get("--dump-artifacts", Expression::none_t{});
+ if (dump_artifacts->IsString()) {
+ clargs->invocation_log.dump_artifacts =
+ dump_artifacts->String();
+ }
auto profile =
invocation_log->Get("--profile", Expression::none_t{});
if (profile->IsString()) {