aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Scripting/ScriptReloadMgr.cpp
diff options
context:
space:
mode:
authorNaios <naios-dev@live.de>2016-04-17 18:11:05 +0200
committerNaios <naios-dev@live.de>2016-04-18 22:11:09 +0200
commitd95bc7329df6ee17498c3231dfae44a88c28fcf9 (patch)
treef7e06202daaae9c1f26d0efa58716d573cbf427d /src/server/game/Scripting/ScriptReloadMgr.cpp
parente6aff18593bc17c29bed907df959351c467aacdc (diff)
Core/Scripting: Add the info how much time the system took to reload
(cherry picked from commit 11b5de63cb7c5acd2f9385a4453b8ac76dec310e)
Diffstat (limited to 'src/server/game/Scripting/ScriptReloadMgr.cpp')
-rw-r--r--src/server/game/Scripting/ScriptReloadMgr.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/server/game/Scripting/ScriptReloadMgr.cpp b/src/server/game/Scripting/ScriptReloadMgr.cpp
index 8b14ca8aeeb..5b492306cd8 100644
--- a/src/server/game/Scripting/ScriptReloadMgr.cpp
+++ b/src/server/game/Scripting/ScriptReloadMgr.cpp
@@ -400,6 +400,8 @@ class HotSwapScriptReloadMgr final
// like "Release" or "Debug". The build directive from the
// previous same module is used if there was any.
std::string script_module_build_directive_;
+ // The time where the build job started
+ uint32 start_time_;
// Type of the current running job
BuildJobType type_;
@@ -412,7 +414,7 @@ class HotSwapScriptReloadMgr final
: script_module_name_(std::move(script_module_name)),
script_module_project_name_(std::move(script_module_project_name)),
script_module_build_directive_(std::move(script_module_build_directive)),
- type_(BuildJobType::BUILD_JOB_NONE) { }
+ start_time_(getMSTime()), type_(BuildJobType::BUILD_JOB_NONE) { }
bool IsValid() const
{
@@ -425,6 +427,8 @@ class HotSwapScriptReloadMgr final
std::string const& GetBuildDirective() const { return script_module_build_directive_; }
+ uint32 GetTimeFromStart() const { return GetMSTimeDiffToNow(start_time_); }
+
BuildJobType GetType() const { return type_; }
std::shared_ptr<Trinity::AsyncProcessResult> const& GetProcess() const
@@ -1116,8 +1120,9 @@ private:
if (!error)
{
// Installation was successful
- TC_LOG_INFO("scripts.hotswap", ">> Successfully installed module %s.",
- _build_job->GetModuleName().c_str());
+ TC_LOG_INFO("scripts.hotswap", ">> Successfully installed module %s in %us",
+ _build_job->GetModuleName().c_str(),
+ _build_job->GetTimeFromStart() / IN_MILLISECONDS);
}
else
{