wip: test logging performance issues

Summary:

Test Plan:
This commit is contained in:
icex2
2025-01-19 22:25:52 +01:00
parent 3d868e33d4
commit 8ec9ec712c
6 changed files with 17 additions and 11 deletions
+9 -7
View File
@@ -116,15 +116,17 @@ static int log_thread_proc(void *ctx)
static void
log_post(char level, const char *module, const char *fmt, va_list ap)
{
if (WaitForSingleObject(log_rv_producer, INFINITE)) {
return;
}
// TODO test if this addresses performance issues and stuttering
// TODO measure time how long waiting takes here?
// if (WaitForSingleObject(log_rv_producer, INFINITE)) {
// return;
// }
log_rv_level = level;
log_rv_module = module;
str_vformat(log_rv_buffer, sizeof(log_rv_buffer), fmt, ap);
// log_rv_level = level;
// log_rv_module = module;
// str_vformat(log_rv_buffer, sizeof(log_rv_buffer), fmt, ap);
ReleaseSemaphore(log_rv_consumer, 1, NULL);
// ReleaseSemaphore(log_rv_consumer, 1, NULL);
}
#define LOG_POST_IMPL(name, level) \