mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2026-01-30 18:49:09 +03:00
replace unordered_map with map, less heap
This commit is contained in:
@@ -1720,8 +1720,8 @@ void EMSdevice::get_value_json(JsonObject json, DeviceValue & dv) {
|
||||
|
||||
// generate Prometheus metrics format from device values
|
||||
std::string EMSdevice::get_metrics_prometheus(const int8_t tag) {
|
||||
std::string result;
|
||||
std::unordered_map<std::string, bool> seen_metrics;
|
||||
std::string result;
|
||||
std::map<std::string, bool> seen_metrics;
|
||||
|
||||
// Helper function to check if a device value type is supported for Prometheus metrics
|
||||
auto is_supported_type = [](uint8_t type) -> bool {
|
||||
|
||||
Reference in New Issue
Block a user