diff --git a/src/RaZ/Utils/FileUtils.cpp b/src/RaZ/Utils/FileUtils.cpp index 5307133e..9484560b 100644 --- a/src/RaZ/Utils/FileUtils.cpp +++ b/src/RaZ/Utils/FileUtils.cpp @@ -1,6 +1,8 @@ #include "RaZ/Utils/FilePath.hpp" #include "RaZ/Utils/FileUtils.hpp" +#include "tracy/Tracy.hpp" + #include namespace Raz::FileUtils { @@ -9,6 +11,8 @@ namespace { template T readFile(const FilePath& filePath) { + ZoneScopedN("[FileUtils]::readFile"); + std::ifstream file(filePath, std::ios::binary | std::ios::ate); if (!file) @@ -39,10 +43,12 @@ bool isReadable(const FilePath& filePath) { } std::vector readFileToArray(const FilePath& filePath) { + ZoneScopedN("FileUtils::readFileToArray"); return readFile>(filePath); } std::string readFileToString(const FilePath& filePath) { + ZoneScopedN("FileUtils::readFileToString"); return readFile(filePath); } diff --git a/src/RaZ/Utils/ThreadPool.cpp b/src/RaZ/Utils/ThreadPool.cpp index 8afa1372..39dcf12f 100644 --- a/src/RaZ/Utils/ThreadPool.cpp +++ b/src/RaZ/Utils/ThreadPool.cpp @@ -2,11 +2,15 @@ #include "RaZ/Utils/Threading.hpp" #include "RaZ/Utils/ThreadPool.hpp" +#include "tracy/Tracy.hpp" + namespace Raz { ThreadPool::ThreadPool() : ThreadPool(Threading::getSystemThreadCount()) {} ThreadPool::ThreadPool(unsigned int threadCount) { + ZoneScopedN("ThreadPool::ThreadPool"); + Logger::debug("[ThreadPool] Initializing (with " + std::to_string(threadCount) + " thread(s))..."); m_threads.reserve(threadCount); @@ -45,6 +49,8 @@ void ThreadPool::addAction(std::function action) { } ThreadPool::~ThreadPool() { + ZoneScopedN("ThreadPool::~ThreadPool"); + Logger::debug("[ThreadPool] Destroying..."); {