2022-12-23 13:50:27 -05:00
|
|
|
/*
|
|
|
|
* Created by Brett on 23/12/22.
|
|
|
|
* Licensed under GNU General Public License V3.0
|
|
|
|
* See LICENSE file for license detail
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef BLT_PROFILER_H
|
|
|
|
#define BLT_PROFILER_H
|
|
|
|
|
2022-12-25 23:19:44 -05:00
|
|
|
#include <string>
|
|
|
|
#include <string_view>
|
2022-12-26 23:44:02 -05:00
|
|
|
#include <unordered_map>
|
|
|
|
|
2022-12-23 13:50:27 -05:00
|
|
|
|
2022-12-26 00:31:00 -05:00
|
|
|
namespace BLT {
|
|
|
|
struct CapturePoint {
|
|
|
|
long point;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct CaptureInterval {
|
|
|
|
CapturePoint start;
|
|
|
|
CapturePoint end;
|
|
|
|
};
|
|
|
|
|
|
|
|
class Profiler {
|
|
|
|
private:
|
2022-12-26 23:36:34 -05:00
|
|
|
std::map<std::string_view, CaptureInterval>* intervals;
|
|
|
|
std::map<std::string_view, CapturePoint>* points;
|
|
|
|
public:
|
|
|
|
Profiler(std::map<std::string_view, CaptureInterval>* test) {
|
|
|
|
intervals = test;
|
|
|
|
}
|
2022-12-26 00:31:00 -05:00
|
|
|
};
|
|
|
|
}
|
2022-12-23 13:50:27 -05:00
|
|
|
|
|
|
|
#endif //BLT_PROFILER_H
|