Skip to content

Commit

Permalink
Improve logging
Browse files Browse the repository at this point in the history
  • Loading branch information
robomics committed Sep 29, 2023
1 parent e03bab3 commit b6a7175
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/hictk/fix_mcool/fix_mcool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,8 @@ static void run_hictk_balance(const FixMcoolConfig& c, std::uint32_t resolution)
int fix_mcool_subcmd(const FixMcoolConfig& c) {
assert(cooler::utils::is_multires_file(c.path_to_input.string()));

const auto t0 = std::chrono::system_clock::now();

const auto resolutions = cooler::MultiResFile{c.path_to_input.string()}.resolutions();
const auto base_resolution = resolutions.front();

Expand All @@ -121,6 +123,12 @@ int fix_mcool_subcmd(const FixMcoolConfig& c) {
std::for_each(resolutions.begin() + 1, resolutions.end(),
[&](const auto& res) { run_hictk_balance(c, res); });

const auto t1 = std::chrono::system_clock::now();
const auto delta = std::chrono::duration_cast<std::chrono::milliseconds>(t1 - t0).count();

SPDLOG_INFO(FMT_STRING("Restoration successfully completed! Elapsed time: {}s"),
static_cast<double>(delta) / 1000.0);

return 0;
}
} // namespace hictk::tools

0 comments on commit b6a7175

Please sign in to comment.