|
TRIQS/TRIQS 4.0.0
Researching Interacting Quantum Systems
|
Timers, signal handling, crash logging and other runtime helpers.
Namespaces | |
| namespace | triqs::signal_handler |
| Signal handling utilities for the TRIQS library. | |
Classes | |
| class | triqs::utility::crash_logger |
| RAII helper that writes user-registered objects to an HDF5 crash dump on abnormal scope exit. More... | |
| class | triqs::utility::timer |
| Accumulating wall-clock timer based on std::chrono::high_resolution_clock. More... | |
Functions | |
| std::function< bool()> | triqs::utility::clock_callback (int time_in_seconds) |
| Build a callback that returns true once a given time in seconds has elapsed since its creation. | |
| std::string | triqs::utility::estimate_time_left (int N, int n, timer &t) |
| Linear extrapolation of the remaining time of a loop, formatted as HH:MM:SS. | |
| std::string | triqs::utility::hours_minutes_seconds_from_seconds (double sec) |
| Format an absolute number of seconds as HH:MM:SS. | |
| std::string | triqs::utility::stack_trace () |
| Capture the current call stack and return it as a demangled, human-readable string. | |
| std::string | triqs::utility::timestamp () |
| Current local time formatted as HH:MM:SS. | |
| std::function< bool()> triqs::utility::clock_callback | ( | int | time_in_seconds | ) |
#include <triqs/utility/callbacks.cpp>
Build a callback that returns true once a given time in seconds has elapsed since its creation.
Typically used as a stop condition for long-running loops (Monte Carlo cycles, optimisers, ...). The first invocation starts the internal clock. Subsequent invocations check the elapsed wall-clock time.
| time_in_seconds | Wall-clock budget in seconds. |
Definition at line 28 of file callbacks.cpp.
|
inline |
#include <triqs/utility/timestamp.hpp>
Linear extrapolation of the remaining time of a loop, formatted as HH:MM:SS.
It uses the provided (running) timer to estimate \( \eta = (N - 1 - n) * t / (n + 1) \), where \(N \) is the total number of iterations, \( n \) is the current iteration index (zero-based), and \( t \) is the total elapsed time so far.
| N | Total number of iterations the loop will perform. |
| n | Index of the current iteration (zero-based). |
| t | Running timer covering the iterations so far. |
Definition at line 84 of file timestamp.hpp.
|
inline |
#include <triqs/utility/timestamp.hpp>
Format an absolute number of seconds as HH:MM:SS.
| sec | Duration in seconds. |
Definition at line 61 of file timestamp.hpp.
| std::string triqs::utility::stack_trace | ( | ) |
#include <triqs/utility/stack_trace.cpp>
Capture the current call stack and return it as a demangled, human-readable string.
Definition at line 35 of file stack_trace.cpp.
|
inline |
#include <triqs/utility/timestamp.hpp>
Current local time formatted as HH:MM:SS.
Definition at line 47 of file timestamp.hpp.