Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ JavaScriptWrapImports: true
KeepEmptyLinesAtTheStartOfBlocks: false
KeepEmptyLinesAtEOF: false
LambdaBodyIndentation: Signature
LineEnding: DeriveLF
LineEnding: LF
MacroBlockBegin: ''
MacroBlockEnd: ''
MaxEmptyLinesToKeep: 1
Expand Down
9 changes: 5 additions & 4 deletions src/iocore/eventsystem/Watchdog.cc
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,9 @@ Monitor::monitor_loop() const
// Divide by a floating point 2 to avoid truncation to zero.
auto sleep_time = _timeout / 2.0;
ink_release_assert(sleep_time.count() > 0);
Dbg(dbg_ctl_watchdog, "Starting watchdog with timeout %" PRIu64 " ms on %zu threads. sleep_time = %" PRIu64 " us",
_timeout.count(), _threads.size(), std::chrono::duration_cast<std::chrono::microseconds>(sleep_time).count());
Dbg(dbg_ctl_watchdog, "Starting watchdog with timeout %lld ms on %zu threads. sleep_time = %lld us",
std::chrono::duration_cast<std::chrono::duration<long long, std::milli>>(_timeout).count(), _threads.size(),
std::chrono::duration_cast<std::chrono::duration<long long, std::micro>>(sleep_time).count());

ink_set_thread_name("[WATCHDOG]");

Expand Down Expand Up @@ -90,8 +91,8 @@ Monitor::monitor_loop() const
uint64_t warned_seq = t->heartbeat_state.warned_seq.load(std::memory_order_relaxed);
if (warned_seq < seq) {
// Warn once per loop iteration
Warning("Watchdog: [ET_NET %zu] has been awake for %" PRIu64 " ms", i,
std::chrono::duration_cast<std::chrono::milliseconds>(awake_duration).count());
Warning("Watchdog: [ET_NET %zu] has been awake for %lld ms", i,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Likewise,

std::chrono::duration_cast<std::chrono::duration<long long, std::milli>>(awake_duration).count());

std::chrono::duration_cast<std::chrono::duration<long long, std::milli>>(awake_duration).count());
t->heartbeat_state.warned_seq.store(seq, std::memory_order_relaxed);
}
}
Expand Down