diff options
author | Naios <naios-dev@live.de> | 2016-04-17 18:11:05 +0200 |
---|---|---|
committer | Naios <naios-dev@live.de> | 2016-04-17 18:11:05 +0200 |
commit | 11b5de63cb7c5acd2f9385a4453b8ac76dec310e (patch) | |
tree | daf2c75196ccdb8e3f73fb64a37af52e2f288176 /src | |
parent | c333d0f6de4ecef31ce4fdb228f8744b38825f69 (diff) |
Core/Scripting: Add the info how much time the system took to reload
Diffstat (limited to 'src')
-rw-r--r-- | src/server/game/Scripting/ScriptReloadMgr.cpp | 11 |
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 { |