|
trajectory_optimization v1.3.1
|
#include <performance_logger.hpp>
Public Member Functions | |
| PerformanceLogger (const std::string &node_name) | |
| Creates a CSV performance log for the given node. | |
| ~PerformanceLogger () | |
| Flushes and closes the performance log. | |
| PerformanceLogger (const PerformanceLogger &)=delete | |
| Copy construction is disabled because the logger owns a file stream. | |
| PerformanceLogger & | operator= (const PerformanceLogger &)=delete |
| Copy assignment is disabled because the logger owns a file stream. | |
| PerformanceLogger (PerformanceLogger &&)=delete | |
| Move construction is disabled to keep the log stream bound to one logger. | |
| PerformanceLogger & | operator= (PerformanceLogger &&)=delete |
| Move assignment is disabled to keep the log stream bound to one logger. | |
| void | write (const PerformanceMetrics &metrics) |
| Appends one set of performance metrics to the CSV log. | |
| const std::filesystem::path & | path () const |
| Returns the path of the CSV performance log. | |
Static Public Member Functions | |
| static void | collectSolverStatistics (PerformanceMetrics &metrics, ocp_nlp_solver *solver, ocp_nlp_config *config, ocp_nlp_dims *dims, ocp_nlp_in *input, ocp_nlp_out *output) |
| Reads timing, iteration, cost, and residual statistics from acados. | |
Private Attributes | |
| std::filesystem::path | path_ |
| std::ofstream | stream_ |
| uint64_t | records_since_flush_ = 0 |
Static Private Attributes | |
| static constexpr uint64_t | FLUSH_INTERVAL = 100 |
Definition at line 52 of file performance_logger.hpp.
|
explicit |
Creates a CSV performance log for the given node.
| [in] | node_name | Node name used as part of the log file name. |
Definition at line 36 of file performance_logger.cpp.
| trajectory_optimization::PerformanceLogger::~PerformanceLogger | ( | ) |
Flushes and closes the performance log.
Definition at line 62 of file performance_logger.cpp.
|
delete |
Copy construction is disabled because the logger owns a file stream.
|
delete |
Move construction is disabled to keep the log stream bound to one logger.
|
static |
Reads timing, iteration, cost, and residual statistics from acados.
| [out] | metrics | Metrics structure populated with the solver statistics. |
| [in] | solver | acados NLP solver instance. |
| [in] | config | acados NLP configuration. |
| [in] | dims | acados NLP dimensions. |
| [in] | input | acados NLP input. |
| [in] | output | acados NLP output. |
Definition at line 67 of file performance_logger.cpp.
|
delete |
Copy assignment is disabled because the logger owns a file stream.
|
delete |
Move assignment is disabled to keep the log stream bound to one logger.
|
inline |
Returns the path of the CSV performance log.
Definition at line 119 of file performance_logger.hpp.
| void trajectory_optimization::PerformanceLogger::write | ( | const PerformanceMetrics & | metrics | ) |
Appends one set of performance metrics to the CSV log.
| [in] | metrics | Metrics collected for one optimization cycle. |
Definition at line 104 of file performance_logger.cpp.
|
staticconstexprprivate |
Definition at line 122 of file performance_logger.hpp.
|
private |
Definition at line 124 of file performance_logger.hpp.
|
private |
Definition at line 126 of file performance_logger.hpp.
|
private |
Definition at line 125 of file performance_logger.hpp.