|
Lightweight 0.20260921.0
|
#include <SqlStatistics.hpp>
Public Member Functions | |
| SqlStatisticsScope (SqlStatisticsOperation operation) noexcept | |
| SqlStatisticsScope (SqlStatisticsScope const &)=delete | |
| SqlStatisticsScope & | operator= (SqlStatisticsScope const &)=delete |
| SqlStatisticsScope (SqlStatisticsScope &&)=delete | |
| SqlStatisticsScope & | operator= (SqlStatisticsScope &&)=delete |
| void | Failed () noexcept |
| Marks the timed operation as having failed. | |
| void | Retried () noexcept |
| Records that the timed operation was transparently retried. | |
RAII scope that times its enclosing region and records it as one operation.
Construct at the top of the region; the destructor records the elapsed time. Call Failed to mark the operation as errored (the destructor still records the latency, so a failing statement contributes to the distribution rather than silently vanishing from it).
Prefer the LIGHTWEIGHT_STATS_SCOPE macro over constructing this directly — it keeps instrumentation call sites uniform, and its destructor's RecordOperation call is itself a no-op whenever collection is runtime-disabled.
Definition at line 410 of file SqlStatistics.hpp.
|
inlineexplicitnoexcept |
Starts timing a region.
| operation | The operation class to record under. |
Definition at line 416 of file SqlStatistics.hpp.
|
inline |
Definition at line 428 of file SqlStatistics.hpp.
|
inlinenoexcept |
Marks the timed operation as having failed.
Definition at line 440 of file SqlStatistics.hpp.
|
inlinenoexcept |
Records that the timed operation was transparently retried.
Definition at line 446 of file SqlStatistics.hpp.