mirror of
https://github.com/djhackersdev/bemanitools.git
synced 2026-04-05 00:34:57 -05:00
wip: test logging performance issues
Summary: Test Plan:
This commit is contained in:
parent
3d868e33d4
commit
8ec9ec712c
|
|
@ -30,7 +30,7 @@ void hdr_mutex_free(struct hdr_mutex* mutex)
|
|||
#endif
|
||||
|
||||
#include <windows.h>
|
||||
#include <WinSock2.h>
|
||||
#include <winsock2.h>
|
||||
|
||||
int hdr_mutex_init(struct hdr_mutex* mutex)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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) \
|
||||
|
|
|
|||
|
|
@ -261,7 +261,8 @@ skip:
|
|||
BOOL WINAPI DllMain(HMODULE mod, DWORD reason, void *ctx)
|
||||
{
|
||||
if (reason == DLL_PROCESS_ATTACH) {
|
||||
log_to_writer(log_writer_debug, NULL);
|
||||
// TODO switched to null writer to see if it addresses performance issues
|
||||
log_to_writer(log_writer_null, NULL);
|
||||
|
||||
/* Bootstrap hook for further init tasks (see above) */
|
||||
|
||||
|
|
|
|||
|
|
@ -254,7 +254,8 @@ skip:
|
|||
BOOL WINAPI DllMain(HMODULE mod, DWORD reason, void *ctx)
|
||||
{
|
||||
if (reason == DLL_PROCESS_ATTACH) {
|
||||
log_to_writer(log_writer_debug, NULL);
|
||||
// TODO switched to null writer to see if it addresses performance issues
|
||||
log_to_writer(log_writer_null, NULL);
|
||||
|
||||
/* Bootstrap hook for further init tasks (see above) */
|
||||
|
||||
|
|
|
|||
|
|
@ -246,7 +246,8 @@ skip:
|
|||
BOOL WINAPI DllMain(HMODULE mod, DWORD reason, void *ctx)
|
||||
{
|
||||
if (reason == DLL_PROCESS_ATTACH) {
|
||||
log_to_writer(log_writer_debug, NULL);
|
||||
// TODO switched to null writer to see if it addresses performance issues
|
||||
log_to_writer(log_writer_null, NULL);
|
||||
|
||||
/* Bootstrap hook for further init tasks (see above) */
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
dlls += iidxio-perf
|
||||
|
||||
ldflags_iidxio-perf := \
|
||||
-lws2_32
|
||||
|
||||
libs_iidxio-perf := \
|
||||
hdr-histogram \
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user