Open Source alternative to Algolia + Pinecone and an Easier-to-Use alternative to ElasticSearch ⚡ 🔍 ✨ Fast, typo tolerant, in-memory fuzzy Search Engine for building delightful search experiences
C++ algoliadatastoreelasticsearchenterprise-searchfacetingfull-text-searchfuzzy-searchgeosearchin-memoryinstantsearchmerchandisingpineconesearchsearch-enginesemantic-searchsimilarity-searchsite-searchsynonymstypo-tolerancevector-search
Standardize metric names.
kishorenc966e9178c655
diff --git a/src/core_api.cpp b/src/core_api.cppindex 9d45645f..e7c75131 100644--- a/src/core_api.cpp+++ b/src/core_api.cpp@@ -519,7 +519,7 @@ bool collection_export_handler(http_req* req, http_res* res, void* data) {res->final = false;it->Next();- // apppend a new line character if there is going to be one more record to send+ // append a new line character if there is going to be one more record to sendif(it->Valid() && it->key().ToString().compare(0, seq_id_prefix.size(), seq_id_prefix) == 0) {res->body += "\n";}diff --git a/src/system_metrics.cpp b/src/system_metrics.cppindex 309d6017..4b1d96d4 100644--- a/src/system_metrics.cpp+++ b/src/system_metrics.cpp@@ -28,9 +28,8 @@ void SystemMetrics::get(const std::string &data_dir_path, nlohmann::json &resultstatvfs(data_dir_path.c_str(), &st);uint64_t disk_total_bytes = st.f_blocks * st.f_frsize;uint64_t disk_used_bytes = (st.f_blocks - st.f_bavail) * st.f_frsize;- uint64_t disk_available_bytes = disk_total_bytes - disk_used_bytes;- result["disk_total_bytes"] = std::to_string(disk_total_bytes);- result["disk_available_bytes"] = std::to_string(disk_available_bytes);+ result["system_disk_total_bytes"] = std::to_string(disk_total_bytes);+ result["system_disk_used_bytes"] = std::to_string(disk_used_bytes);// MEMORY METRICS@@ -88,7 +87,8 @@ void SystemMetrics::get(const std::string &data_dir_path, nlohmann::json &resultmemory_total_bytes = sys_info.totalram;#endif- result["system_memory_available_bytes"] = std::to_string(memory_available_bytes);+ uint64_t memory_used_bytes = memory_total_bytes - memory_available_bytes;+ result["system_memory_used_bytes"] = std::to_string(memory_used_bytes);result["system_memory_total_bytes"] = std::to_string(memory_total_bytes);// CPU METRICS@@ -97,7 +97,7 @@ void SystemMetrics::get(const std::string &data_dir_path, nlohmann::json &resultfor(size_t i = 0; i < cpu_stats.size(); i++) {std::string cpu_id = (i == 0) ? "" : std::to_string(i);- result["cpu" + cpu_id + "_active_percentage"] = cpu_stats[i].active;+ result["system_cpu" + cpu_id + "_active_percentage"] = cpu_stats[i].active;}#endif}