@@ -241,19 +241,19 @@ void builder::build(const build_params& params) const { | |||
dds::stopwatch sw; | |||
plan.compile_all(env, params.parallel_jobs); | |||
log::info("Compilation completed in {:n}ms", sw.elapsed_ms().count()); | |||
log::info("Compilation completed in {:L}ms", sw.elapsed_ms().count()); | |||
sw.reset(); | |||
plan.archive_all(env, params.parallel_jobs); | |||
log::info("Archiving completed in {:n}ms", sw.elapsed_ms().count()); | |||
log::info("Archiving completed in {:L}ms", sw.elapsed_ms().count()); | |||
sw.reset(); | |||
plan.link_all(env, params.parallel_jobs); | |||
log::info("Runtime binary linking completed in {:n}ms", sw.elapsed_ms().count()); | |||
log::info("Runtime binary linking completed in {:L}ms", sw.elapsed_ms().count()); | |||
sw.reset(); | |||
auto test_failures = plan.run_all_tests(env, params.parallel_jobs); | |||
log::info("Test execution finished in {:n}ms", sw.elapsed_ms().count()); | |||
log::info("Test execution finished in {:L}ms", sw.elapsed_ms().count()); | |||
for (auto& fail : test_failures) { | |||
log_failure(fail); |
@@ -42,7 +42,7 @@ void create_archive_plan::archive(const build_env& env) const { | |||
// Do it! | |||
log::info("[{}] Archive: {}", _qual_name, out_relpath); | |||
auto&& [dur_ms, ar_res] = timed<std::chrono::milliseconds>([&] { return run_proc(ar_cmd); }); | |||
log::info("[{}] Archive: {} - {:n}ms", _qual_name, out_relpath, dur_ms.count()); | |||
log::info("[{}] Archive: {} - {:L}ms", _qual_name, out_relpath, dur_ms.count()); | |||
// Check, log, and throw | |||
if (!ar_res.okay()) { |
@@ -58,7 +58,7 @@ do_compile(const compile_file_full& cf, build_env_ref env, compile_counter& coun | |||
auto&& [dur_ms, proc_res] | |||
= timed<std::chrono::milliseconds>([&] { return run_proc(cf.cmd_info.command); }); | |||
auto nth = counter.n.fetch_add(1); | |||
log::info("{:60} - {:>7n}ms [{:{}}/{}]", | |||
log::info("{:60} - {:>7L}ms [{:{}}/{}]", | |||
msg, | |||
dur_ms.count(), | |||
nth, |
@@ -51,7 +51,7 @@ void link_executable_plan::link(build_env_ref env, const library_plan& lib) cons | |||
log::info(msg); | |||
auto [dur_ms, proc_res] | |||
= timed<std::chrono::milliseconds>([&] { return run_proc(link_command); }); | |||
log::info("{} - {:>6n}ms", msg, dur_ms.count()); | |||
log::info("{} - {:>6L}ms", msg, dur_ms.count()); | |||
// Check and throw if errant | |||
if (!proc_res.okay()) { | |||
@@ -82,13 +82,13 @@ std::optional<test_failure> link_executable_plan::run_test(build_env_ref env) co | |||
[&] { return run_proc({.command = {exe_path.string()}, .timeout = 10s}); }); | |||
if (res.okay()) { | |||
log::info("{} - PASSED - {:>9n}μs", msg, dur.count()); | |||
log::info("{} - PASSED - {:>9L}μs", msg, dur.count()); | |||
return std::nullopt; | |||
} else { | |||
auto exit_msg = fmt::format(res.signal ? "signalled {}" : "exited {}", | |||
res.signal ? res.signal : res.retc); | |||
auto fail_str = res.timed_out ? "TIMEOUT" : "FAILED "; | |||
log::error("{} - {} - {:>9n}μs [{}]", msg, fail_str, dur.count(), exit_msg); | |||
log::error("{} - {} - {:>9L}μs [{}]", msg, fail_str, dur.count(), exit_msg); | |||
test_failure f; | |||
f.executable_path = exe_path; | |||
f.output = res.output; |
@@ -2,10 +2,10 @@ | |||
#include <dds/error/errors.hpp> | |||
#include <fmt/core.h> | |||
#include <json5/parse_data.hpp> | |||
#include <neo/assert.hpp> | |||
#include <semester/walk.hpp> | |||
#include <spdlog/fmt/fmt.h> | |||
#include <optional> | |||
@@ -31,7 +31,7 @@ struct any_key { | |||
}; | |||
template <typename KF, typename... Args> | |||
any_key(KF&&, Args&&...) -> any_key<KF, Args...>; | |||
any_key(KF&&, Args&&...)->any_key<KF, Args...>; | |||
namespace { | |||
@@ -6,7 +6,7 @@ | |||
#include <json5/parse_data.hpp> | |||
#include <semester/walk.hpp> | |||
#include <spdlog/fmt/fmt.h> | |||
#include <fmt/core.h> | |||
#include <cctype> | |||
#include <sstream> |
@@ -1,6 +1,6 @@ | |||
#pragma once | |||
#include <spdlog/fmt/fmt.h> | |||
#include <fmt/core.h> | |||
#include <stdexcept> | |||
#include <string_view> |
@@ -2,7 +2,7 @@ | |||
#include <dds/error/errors.hpp> | |||
#include <spdlog/fmt/fmt.h> | |||
#include <fmt/core.h> | |||
#include <tuple> | |||
@@ -6,9 +6,9 @@ | |||
#include <dds/util/algo.hpp> | |||
#include <dds/util/shlex.hpp> | |||
#include <fmt/core.h> | |||
#include <json5/parse_data.hpp> | |||
#include <semester/decomp.hpp> | |||
#include <spdlog/fmt/fmt.h> | |||
#include <string> | |||
@@ -4,7 +4,7 @@ | |||
#include <dds/error/errors.hpp> | |||
#include <dds/util/algo.hpp> | |||
#include <spdlog/fmt/fmt.h> | |||
#include <fmt/core.h> | |||
#include <stdexcept> | |||
@@ -4,7 +4,7 @@ | |||
#include <dds/util/signal.hpp> | |||
#include <spdlog/fmt/fmt.h> | |||
#include <fmt/core.h> | |||
#include <fcntl.h> | |||
#include <sys/file.h> |
@@ -4,9 +4,11 @@ | |||
#include <dds/util/signal.hpp> | |||
#include <spdlog/fmt/fmt.h> | |||
#include <fmt/core.h> | |||
#include <wil/resource.h> | |||
#include <cassert> | |||
using namespace dds; | |||
namespace { |
@@ -1,6 +1,6 @@ | |||
#include "./fs.hpp" | |||
#include <spdlog/fmt/fmt.h> | |||
#include <fmt/core.h> | |||
#include <sstream> | |||
@@ -26,7 +26,7 @@ concept formattable = requires (const T item) { | |||
}; | |||
template <formattable... Args> | |||
void log(level l, std::string_view s, const Args&... args) { | |||
void log(level l, std::string_view s, const Args&... args) noexcept { | |||
if (int(l) >= int(current_log_level)) { | |||
auto message = fmt::format(s, args...); | |||
log_print(l, message); |
@@ -2,7 +2,7 @@ | |||
#include <libman/parse.hpp> | |||
#include <spdlog/fmt/fmt.h> | |||
#include <fmt/core.h> | |||
using namespace lm; | |||
@@ -2,7 +2,7 @@ | |||
#include <libman/parse.hpp> | |||
#include <spdlog/fmt/fmt.h> | |||
#include <fmt/core.h> | |||
using namespace lm; | |||
@@ -2,7 +2,7 @@ | |||
#include <libman/util.hpp> | |||
#include <spdlog/fmt/fmt.h> | |||
#include <fmt/core.h> | |||
#include <cctype> | |||
#include <fstream> |