|
| | ActiveTimer (QueryMetrics &query_metrics, const MetricType metric, const bool is_active=true) |
|
| ActiveTimer (const ActiveTimer &other)=delete |
|
ActiveTimer & | operator= (const ActiveTimer &)=delete |
| | ActiveTimer (ActiveTimer &&other) noexcept |
| | enable move constructors
|
| ActiveTimer & | operator= (ActiveTimer &&other) noexcept |
| void | EndTimer () |
| void | Reset () |
◆ ActiveTimer() [1/3]
| duckdb::ActiveTimer::ActiveTimer |
( |
| ) |
|
|
inline |
36659 : metric(MetricType::EXTRA_INFO), is_active(false) {
36660 }
◆ ActiveTimer() [2/3]
| duckdb::ActiveTimer::ActiveTimer |
( |
QueryMetrics & | query_metrics, |
|
|
const MetricType | metric, |
|
|
const bool | is_active = true ) |
|
inline |
36661 : query_metrics(query_metrics), metric(metric), is_active(is_active) {
36662
36663 if (!is_active) {
36664 return;
36665 }
36666 profiler.Start();
36667 }
◆ ~ActiveTimer()
| duckdb::ActiveTimer::~ActiveTimer |
( |
| ) |
|
|
inline |
36668 {
36669 if (is_active) {
36670
36671 EndTimer();
36672 }
36673 }
◆ ActiveTimer() [3/3]
| duckdb::ActiveTimer::ActiveTimer |
( |
ActiveTimer && | other | ) |
|
|
inlinenoexcept |
enable move constructors
36678 : is_active(false) {
36679 std::swap(query_metrics, other.query_metrics);
36680 std::swap(metric, other.metric);
36681 std::swap(profiler, other.profiler);
36682 std::swap(is_active, other.is_active);
36683 }
◆ operator=()
| ActiveTimer & duckdb::ActiveTimer::operator= |
( |
ActiveTimer && | other | ) |
|
|
inlinenoexcept |
36684 {
36685 std::swap(query_metrics, other.query_metrics);
36686 std::swap(metric, other.metric);
36687 std::swap(profiler, other.profiler);
36688 std::swap(is_active, other.is_active);
36689 return *this;
36690 }
◆ EndTimer()
| void duckdb::ActiveTimer::EndTimer |
( |
| ) |
|
|
inline |
36693 {
36694 if (!is_active) {
36695 return;
36696 }
36697
36698 is_active = false;
36699 profiler.End();
36700 query_metrics->UpdateMetric(metric, profiler.ElapsedNanos());
36701 }
◆ Reset()
| void duckdb::ActiveTimer::Reset |
( |
| ) |
|
|
inline |
36703 {
36704 if (!is_active) {
36705 return;
36706 }
36707 profiler.Reset();
36708 is_active = false;
36709 }
The documentation for this struct was generated from the following file: