-
Notifications
You must be signed in to change notification settings - Fork 208
Open
Description
in flare/base/tsc.h
inline std::uint64_t TscElapsed(std::uint64_t start, std::uint64_t to) {
if (FLARE_UNLIKELY(start >= to)) {
FLARE_LOG_WARNING_IF_EVERY_N(
start - to > 1'000'000, 100,
"Unexpected: TSC goes backward for more than 1M cycles (0.5ms on "
"2GHz). You will likely see some unreasonable timestamps. Called with "
"start = {}, to = {}.",
start, to);
return 0;
}
return to - start;
}when the code calls into the following code:
template <class... Ts>
std::string FormatLog([[maybe_unused]] const char* file,
[[maybe_unused]] int line, const Ts&... args) noexcept {
std::string result;
WritePrefixTo(&result);
if constexpr (sizeof...(Ts) != 0) {
try {
result += fmt::format(args...);
} catch (const std::exception& xcpt) {
// Presumably a wrong format string was provided?
LOG(FATAL) << "Failed to format log at [" << file << ":" << line
<< "]: " << xcpt.what();
}
}
return result;
}there is a compiling issue:
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
