mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-12-29 14:14:45 +03:00
Shell: Hide job times behind SHELL_JOB_DEBUG flag
This commit is contained in:
parent
0d0f52337c
commit
a5889b9aad
Notes:
sideshowbarker
2024-07-18 17:38:42 +09:00
Author: https://github.com/ADKaster Commit: https://github.com/SerenityOS/serenity/commit/a5889b9aad9 Pull-request: https://github.com/SerenityOS/serenity/pull/6459 Issue: https://github.com/SerenityOS/serenity/issues/5541 Reviewed-by: https://github.com/IdanHo Reviewed-by: https://github.com/alimpfard Reviewed-by: https://github.com/bgianfo ✅
@ -350,6 +350,10 @@
|
||||
#cmakedefine01 SH_LANGUAGE_SERVER_DEBUG
|
||||
#endif
|
||||
|
||||
#ifndef SHELL_JOB_DEBUG
|
||||
#cmakedefine01 SHELL_JOB_DEBUG
|
||||
#endif
|
||||
|
||||
#ifndef SOLITAIRE_DEBUG
|
||||
#cmakedefine01 SOLITAIRE_DEBUG
|
||||
#endif
|
||||
|
@ -57,6 +57,7 @@ set(CRYPTO_DEBUG ON)
|
||||
set(DWARF_DEBUG ON)
|
||||
set(HUNKS_DEBUG ON)
|
||||
set(JOB_DEBUG ON)
|
||||
set(SHELL_JOB_DEBUG ON)
|
||||
set(GIF_DEBUG ON)
|
||||
set(JPG_DEBUG ON)
|
||||
set(EMOJI_DEBUG ON)
|
||||
|
@ -8,6 +8,7 @@
|
||||
|
||||
#include "Execution.h"
|
||||
#include "Forward.h"
|
||||
#include <AK/Debug.h>
|
||||
#include <AK/Function.h>
|
||||
#include <AK/JsonObject.h>
|
||||
#include <AK/JsonValue.h>
|
||||
@ -16,11 +17,6 @@
|
||||
#include <LibCore/ElapsedTimer.h>
|
||||
#include <LibCore/Object.h>
|
||||
|
||||
#define JOB_TIME_INFO
|
||||
#ifndef __serenity__
|
||||
# undef JOB_TIME_INFO
|
||||
#endif
|
||||
|
||||
namespace Shell {
|
||||
|
||||
struct LocalFrame;
|
||||
@ -31,13 +27,13 @@ public:
|
||||
|
||||
~Job()
|
||||
{
|
||||
#ifdef JOB_TIME_INFO
|
||||
if constexpr (SHELL_JOB_DEBUG) {
|
||||
if (m_active) {
|
||||
auto elapsed = m_command_timer.elapsed();
|
||||
// Don't mistake this for the command!
|
||||
dbgln("Job entry '{}' deleted in {} ms", m_cmd, elapsed);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
Function<void(RefPtr<Job>)> on_exit;
|
||||
|
Loading…
Reference in New Issue
Block a user