refactor: merge memory_used.hpp and system_version.hpp into system_info.hpp

This commit is contained in:
2026-04-16 22:48:47 +08:00
parent 278fcef295
commit b07adea771
4 changed files with 34 additions and 41 deletions

View File

@@ -4,7 +4,7 @@
#include <Cubed/map_table.hpp>
#include <Cubed/tools/cubed_assert.hpp>
#include <Cubed/tools/log.hpp>
#include <Cubed/tools/memory_used.hpp>
#include <Cubed/tools/system_info.hpp>
#include <Cubed/tools/perlin_noise.hpp>
#include <exception>
@@ -166,7 +166,7 @@ void App::update() {
frame_count = 0;
fps_time_count = 0.0f;
DebugCollector::get().report("fps", std::string{"FPS: " + std::to_string(fps)});
DebugCollector::get().report("rss", std::format("RSS: {}mb", get_current_rss() / (1024 * 1024)));
DebugCollector::get().report("rss", std::format("RSS: {}mb", Tools::get_current_rss() / (1024 * 1024)));
}
m_texture_manager.update();
m_world.update(delta_time);

View File

@@ -1,6 +1,6 @@
#include <Cubed/debug_collector.hpp>
#include <Cubed/tools/system_version.hpp>
#include <Cubed/tools/system_info.hpp>
#include <Cubed/tools/cubed_hash.hpp>
DebugCollector::DebugCollector() {
@@ -44,7 +44,7 @@ void DebugCollector::init_text() {
os_text
.scale(0.8f)
.position(0.0f, 250.0f);
if (get_os_version(os)) {
if (Tools::get_os_version(os)) {
os_text
.text("OS: " + os);
Logger::info("System: {}", os);