Autonomy Software C++ 24.5.1
Welcome to the Autonomy Software repository of the Mars Rover Design Team (MRDT) at Missouri University of Science and Technology (Missouri S&T)! API reference contains the source code and other resources for the development of the autonomy software for our Mars rover. The Autonomy Software project aims to compete in the University Rover Challenge (URC) by demonstrating advanced autonomous capabilities and robust navigation algorithms.
Loading...
Searching...
No Matches
duckdb::ActiveTimer Struct Reference
Collaboration diagram for duckdb::ActiveTimer:

Public Member Functions

 ActiveTimer (QueryMetrics &query_metrics, const MetricType metric, const bool is_active=true)
 
 ActiveTimer (const ActiveTimer &other)=delete
 
ActiveTimeroperator= (const ActiveTimer &)=delete
 
 ActiveTimer (ActiveTimer &&other) noexcept
 enable move constructors
 
ActiveTimeroperator= (ActiveTimer &&other) noexcept
 
void EndTimer ()
 
void Reset ()
 

Private Attributes

optional_ptr< QueryMetricsquery_metrics
 
MetricType metric
 
Profiler profiler
 
bool is_active
 

Constructor & Destructor Documentation

◆ 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 // start on constructor
36663 if (!is_active) {
36664 return;
36665 }
36666 profiler.Start();
36667 }
void Start()
Start the timer.
Definition duckdb.hpp:35907

◆ ~ActiveTimer()

duckdb::ActiveTimer::~ActiveTimer ( )
inline
36668 {
36669 if (is_active) {
36670 // automatically end in destructor
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 }

Member Function Documentation

◆ 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 // stop profiling and report
36698 is_active = false;
36699 profiler.End();
36700 query_metrics->UpdateMetric(metric, profiler.ElapsedNanos());
36701 }
void End()
End the timer.
Definition duckdb.hpp:35913

◆ Reset()

void duckdb::ActiveTimer::Reset ( )
inline
36703 {
36704 if (!is_active) {
36705 return;
36706 }
36707 profiler.Reset();
36708 is_active = false;
36709 }
void Reset()
Reset the timer.
Definition duckdb.hpp:35918

The documentation for this struct was generated from the following file: