mirror of
https://github.com/zhenyan121/Cubed.git
synced 2026-06-18 00:27:02 +08:00
feat: add rss record
This commit is contained in:
@@ -4,6 +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/perlin_noise.hpp>
|
||||
|
||||
#include <exception>
|
||||
@@ -161,10 +162,11 @@ void App::update() {
|
||||
if (fps_time_count >= 1.0f) {
|
||||
fps = static_cast<int>(frame_count / fps_time_count);
|
||||
std::string title = "Cubed FPS: " + std::to_string(fps);
|
||||
DebugCollector::get().report("fps", std::string{"FPS: " + std::to_string(fps)});
|
||||
glfwSetWindowTitle(m_window.get_glfw_window(), title.c_str());
|
||||
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)));
|
||||
}
|
||||
m_texture_manager.update();
|
||||
m_world.update(delta_time);
|
||||
|
||||
Reference in New Issue
Block a user