Lens AI Profiler Cpp
customprofile.h
1 #ifndef CUSTOMPROFILE_H
2 #define CUSTOMPROFILE_H
3 
4 #include <string>
5 #include <unordered_map>
6 #include <opencv2/opencv.hpp> // For OpenCV matrix types
7 #include <iostream>
8 #include <vector>
9 #include <map>
10 #include "saver.h"
11 #include "generic.h"
12 #include <kll_sketch.hpp>
13 
14 
19 
21 public:
28  CustomProfile(const std::string& conf_path, int save_interval);
33 
40  int profile(const std::string& name, float value);
41 
42 private:
47  void registerStatistics(const std::string& name);
48 
55  distributionBox* getBox(const std::string& name);
56 
57  // Configurations read from the INI file
58  std::map<std::string, std::vector<std::string>> customConfig;
59 
60  // Path for saving statistics
61  std::string statSavepath;
62  std::string dataSavepath;
63 
64  // Saver object for saving statistics periodically
65  Saver* saver;
66 
67  // Map to store KLL sketches based on statistic names
68  std::unordered_map<int, distributionBox*> custom_stat_;
69 
70 };
71 
72 #endif // CUSTOMPROFILE_H
73 
Class for computing and managing various image statistics.
Definition: customprofile.h:20
CustomProfile(const std::string &conf_path, int save_interval)
Constructor to initialize CustomProfile object.
Definition: customprofile.cpp:19
int profile(const std::string &name, float value)
Computes and logs selected statistics.
Definition: customprofile.cpp:57
~CustomProfile()
Destructor to clean up resources.
Definition: customprofile.cpp:41
Definition: saver.h:39