1
0
mirror of synced 2024-11-28 17:40:51 +01:00

pattern: Display evaluation time when pattern finished running

This commit is contained in:
WerWolv 2022-10-22 15:47:50 +02:00
parent 2c167d6d27
commit 3b7f2fbdaa
2 changed files with 8 additions and 2 deletions

@ -1 +1 @@
Subproject commit fb3059bfaa292319135ae947cc0b9ca690a2e582 Subproject commit dde9ab27bdfd9ef0691f05a0dad8bf03fcf17ae9

View File

@ -18,7 +18,7 @@
#include <content/helpers/provider_extra_data.hpp> #include <content/helpers/provider_extra_data.hpp>
#include <nlohmann/json.hpp> #include <nlohmann/json.hpp>
#include <ranges> #include <chrono>
namespace hex::plugin::builtin { namespace hex::plugin::builtin {
@ -626,8 +626,14 @@ namespace hex::plugin::builtin {
this->m_runningEvaluators--; this->m_runningEvaluators--;
this->m_lastEvaluationProcessed = false; this->m_lastEvaluationProcessed = false;
this->m_lastEvaluationLog.emplace_back(
pl::core::LogConsole::Level::Info,
hex::format("Evaluation took {}", runtime->getLastRunningTime())
);
}; };
this->m_lastEvaluationResult = runtime->executeString(code, envVars, inVariables); this->m_lastEvaluationResult = runtime->executeString(code, envVars, inVariables);
if (!this->m_lastEvaluationResult) { if (!this->m_lastEvaluationResult) {
this->m_lastEvaluationError = runtime->getError(); this->m_lastEvaluationError = runtime->getError();