mirror of
https://github.com/MaskRay/ccls.git
synced 2024-11-22 15:45:08 +00:00
Fix IPC message e2e hiding
This commit is contained in:
parent
3d0b8fd807
commit
14009293ba
@ -59,18 +59,6 @@ const int kExpectedClientVersion = 2;
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
#if false
|
|
||||||
std::string FormatMicroseconds(long long microseconds) {
|
|
||||||
long long milliseconds = microseconds / 1000;
|
|
||||||
long long remaining = microseconds - milliseconds;
|
|
||||||
|
|
||||||
// Only show two digits after the dot.
|
|
||||||
while (remaining >= 100)
|
|
||||||
remaining /= 10;
|
|
||||||
|
|
||||||
return std::to_string(milliseconds) + "." + std::to_string(remaining) + "ms";
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -3426,7 +3414,7 @@ void StdoutMain(std::unordered_map<IpcId, Timer>* request_times, MultiQueueWaite
|
|||||||
case IpcId::Cout: {
|
case IpcId::Cout: {
|
||||||
auto msg = static_cast<Ipc_Cout*>(message.get());
|
auto msg = static_cast<Ipc_Cout*>(message.get());
|
||||||
|
|
||||||
if (ShouldDisplayIpcTiming(message->method_id)) {
|
if (ShouldDisplayIpcTiming(msg->original_ipc_id)) {
|
||||||
Timer time = (*request_times)[msg->original_ipc_id];
|
Timer time = (*request_times)[msg->original_ipc_id];
|
||||||
time.ResetAndPrint("[e2e] Running " + std::string(IpcIdToString(msg->original_ipc_id)));
|
time.ResetAndPrint("[e2e] Running " + std::string(IpcIdToString(msg->original_ipc_id)));
|
||||||
}
|
}
|
||||||
|
12
src/utils.cc
12
src/utils.cc
@ -322,3 +322,15 @@ float GetProcessMemoryUsedInMb() {
|
|||||||
return memory_after / kBytesToMb;
|
return memory_after / kBytesToMb;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::string FormatMicroseconds(long long microseconds) {
|
||||||
|
long long milliseconds = microseconds / 1000;
|
||||||
|
long long remaining = microseconds - milliseconds;
|
||||||
|
|
||||||
|
// Only show two digits after the dot.
|
||||||
|
while (remaining >= 100)
|
||||||
|
remaining /= 10;
|
||||||
|
|
||||||
|
return std::to_string(milliseconds) + "." + std::to_string(remaining) + "ms";
|
||||||
|
}
|
||||||
|
|
||||||
|
@ -131,3 +131,5 @@ inline void hash_combine(std::size_t& seed, const T& v, Rest... rest) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
float GetProcessMemoryUsedInMb();
|
float GetProcessMemoryUsedInMb();
|
||||||
|
|
||||||
|
std::string FormatMicroseconds(long long microseconds);
|
Loading…
Reference in New Issue
Block a user