diff options
author | Klaus Aehlig <klaus.aehlig@huawei.com> | 2025-05-09 11:17:21 +0200 |
---|---|---|
committer | Klaus Aehlig <klaus.aehlig@huawei.com> | 2025-05-09 11:25:16 +0200 |
commit | 1c4b5c63ca9c4464ac3f1b07c7f1c07ad690f582 (patch) | |
tree | b82a28ec148f66a8333866002a6963f4bfb095e5 | |
parent | 3ddde7ba476d8dab4a8f18bf9fe00bc40f5b99ac (diff) | |
download | justbuild-1c4b5c63ca9c4464ac3f1b07c7f1c07ad690f582.tar.gz |
invocation log: include seconds in directory name
The directory name is designed to allow an easy rough sorting by
time. This can also be used to identify the latest build for a
specific user. However, users often run several builds in a single
minute; therefore, increase time-stamp precission to include
seconds as well. While still lexicographic and chronological order
will disagree, at least for a single user it will be correct most
of the times.
-rw-r--r-- | doc/concepts/profiling.md | 4 | ||||
-rw-r--r-- | src/other_tools/just_mr/launch.cpp | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/doc/concepts/profiling.md b/doc/concepts/profiling.md index 4030b638..08bc04ef 100644 --- a/doc/concepts/profiling.md +++ b/doc/concepts/profiling.md @@ -184,8 +184,8 @@ a directory `<prefix>/<project-id>/<YYYY-mm-DD-HH:MM>-<uuid>` where the committed code base (via rc-file merging) whereas the general logging location can be specified in a user-specific or machine-specific way. - - `<YYYY-mm-DD-HH:MM>` is the UTC timestamp (year, moth, day, - hours, minutes) of the invocation and `<uuid>` is a universally + - `<YYYY-mm-DD-HH:MM:SS>` is the UTC timestamp (year, moth, day, + hours, minutes, seconds) of the invocation and `<uuid>` is a universally unique id for that invocation (following RFC9562). The reason we prefix the UUID with a time stamp is allow a simple time-based collection and clean up of the log data. diff --git a/src/other_tools/just_mr/launch.cpp b/src/other_tools/just_mr/launch.cpp index dc861c11..7d2bdf25 100644 --- a/src/other_tools/just_mr/launch.cpp +++ b/src/other_tools/just_mr/launch.cpp @@ -284,7 +284,7 @@ auto CallJust(std::optional<std::filesystem::path> const& config_file, } std::string uuid = CreateUUID(); auto invocation_id = fmt::format( - "{:%Y-%m-%d-%H:%M}-{}", fmt::gmtime(invocation_time), uuid); + "{:%Y-%m-%d-%H:%M:%S}-{}", fmt::gmtime(invocation_time), uuid); dir = dir / invocation_id; if (FileSystemManager::CreateDirectoryExclusive(dir)) { if (invocation_log.invocation_msg) { |