Loading core/CHANGELOG.md +2 −0 Original line number Diff line number Diff line Loading @@ -17,6 +17,8 @@ Please mark all change in change log and use the ticket from JIRA. - MS-640 - Cache object size calculate incorrect - MS-641 - Segment fault(signal 11) in PickToLoad - MS-639 - SQ8H index created failed and server hang - MS-647 - [monitor] grafana display average cpu-temp - MS-644 - Search crashed with index-type: flat - MS-624 - Search vectors failed if time ranges long enough ## Improvement Loading core/src/metrics/PrometheusMetrics.cpp +11 −2 Original line number Diff line number Diff line Loading @@ -222,10 +222,19 @@ PrometheusMetrics::CPUTemperature() { std::vector<float> CPU_temperatures = server::SystemInfo::GetInstance().CPUTemperature(); float avg_cpu_temp = 0; for (int i = 0; i < CPU_temperatures.size(); ++i) { prometheus::Gauge& cpu_temp = CPU_temperature_.Add({{"CPU", std::to_string(i)}}); cpu_temp.Set(CPU_temperatures[i]); avg_cpu_temp += CPU_temperatures[i]; } avg_cpu_temp /= CPU_temperatures.size(); prometheus::Gauge& cpu_temp = CPU_temperature_.Add({{"CPU", std::to_string(0)}}); cpu_temp.Set(avg_cpu_temp); // for (int i = 0; i < CPU_temperatures.size(); ++i) { // prometheus::Gauge& cpu_temp = CPU_temperature_.Add({{"CPU", std::to_string(i)}}); // cpu_temp.Set(CPU_temperatures[i]); // } } void Loading core/src/scheduler/action/PushTaskToNeighbour.cpp +12 −10 Original line number Diff line number Diff line Loading @@ -110,6 +110,7 @@ Action::DefaultLabelTaskScheduler(ResourceMgrWPtr res_mgr, ResourcePtr resource, bool moved = false; // to support test task, REFACTOR if (resource->type() == ResourceType::CPU) { if (auto index_engine = search_task->index_engine_) { auto location = index_engine->GetLocation(); Loading @@ -123,6 +124,7 @@ Action::DefaultLabelTaskScheduler(ResourceMgrWPtr res_mgr, ResourcePtr resource, } } } } if (not moved) { PushTaskToNeighbourRandomly(task, resource); Loading Loading
core/CHANGELOG.md +2 −0 Original line number Diff line number Diff line Loading @@ -17,6 +17,8 @@ Please mark all change in change log and use the ticket from JIRA. - MS-640 - Cache object size calculate incorrect - MS-641 - Segment fault(signal 11) in PickToLoad - MS-639 - SQ8H index created failed and server hang - MS-647 - [monitor] grafana display average cpu-temp - MS-644 - Search crashed with index-type: flat - MS-624 - Search vectors failed if time ranges long enough ## Improvement Loading
core/src/metrics/PrometheusMetrics.cpp +11 −2 Original line number Diff line number Diff line Loading @@ -222,10 +222,19 @@ PrometheusMetrics::CPUTemperature() { std::vector<float> CPU_temperatures = server::SystemInfo::GetInstance().CPUTemperature(); float avg_cpu_temp = 0; for (int i = 0; i < CPU_temperatures.size(); ++i) { prometheus::Gauge& cpu_temp = CPU_temperature_.Add({{"CPU", std::to_string(i)}}); cpu_temp.Set(CPU_temperatures[i]); avg_cpu_temp += CPU_temperatures[i]; } avg_cpu_temp /= CPU_temperatures.size(); prometheus::Gauge& cpu_temp = CPU_temperature_.Add({{"CPU", std::to_string(0)}}); cpu_temp.Set(avg_cpu_temp); // for (int i = 0; i < CPU_temperatures.size(); ++i) { // prometheus::Gauge& cpu_temp = CPU_temperature_.Add({{"CPU", std::to_string(i)}}); // cpu_temp.Set(CPU_temperatures[i]); // } } void Loading
core/src/scheduler/action/PushTaskToNeighbour.cpp +12 −10 Original line number Diff line number Diff line Loading @@ -110,6 +110,7 @@ Action::DefaultLabelTaskScheduler(ResourceMgrWPtr res_mgr, ResourcePtr resource, bool moved = false; // to support test task, REFACTOR if (resource->type() == ResourceType::CPU) { if (auto index_engine = search_task->index_engine_) { auto location = index_engine->GetLocation(); Loading @@ -123,6 +124,7 @@ Action::DefaultLabelTaskScheduler(ResourceMgrWPtr res_mgr, ResourcePtr resource, } } } } if (not moved) { PushTaskToNeighbourRandomly(task, resource); Loading