Lane and Object Detection
Using OpenCV and YOLOv7
Loading...
Searching...
No Matches
Performance.hpp
1#pragma once
2
3#include <chrono>
4#include <cstdint>
5#include <string>
6#include <vector>
7
8#include "helpers/Information.hpp"
9
15{
21 {
22 public:
26 explicit Performance();
27
31 void StartTimer();
32
36 void EndTimer();
37
44
50 std::vector<uint32_t> GetFrameTimes();
51
57 static std::string GetTimeUnit();
58
64 static uint32_t GetTimeUnitConversion();
65
70
71 private:
76
80 std::vector<uint32_t> m_frameTimes;
81
85 std::chrono::time_point<std::chrono::high_resolution_clock> m_startTime;
86 };
87}
PerformanceInformation GetInformation()
Get the PerformanceInformation struct.
Performance()
Constructs a new Performance object.
std::vector< uint32_t > GetFrameTimes()
Get the times to compute each and every frame.
static std::string GetTimeUnit()
Get the time unit for the frame times.
std::chrono::time_point< std::chrono::high_resolution_clock > m_startTime
The time the internal timer was started within StartTimer().
static uint32_t GetTimeUnitConversion()
Get the divisor needed to convert the frame times to seconds.
PerformanceInformation m_performanceInformation
The PerformanceInformation struct containing all performance-related information.
void ClearPerformanceInformation()
Clears all performance-related information.
void EndTimer()
End the internal timer.
void StartTimer()
Start the internal timer.
std::vector< uint32_t > m_frameTimes
The frame times that have been measured.
Contains all Lane-and-Object-Detection objects.
The information needed by FrameBuilder to update frame with performance information.