WIP measure latency + remove wrong comment

This commit is contained in:
Quentin Dufour 2019-02-14 17:41:52 +01:00
parent 8165b4a907
commit afbb41fa2e
3 changed files with 19 additions and 2 deletions

View file

@ -26,13 +26,17 @@ list(APPEND CSOURCES
) )
add_executable(donar ${CSOURCES} src/donar.c) add_executable(donar ${CSOURCES} src/donar.c)
add_executable(measlat ${CSOURCES} src/meas_lat.c)
find_package(PkgConfig REQUIRED) find_package(PkgConfig REQUIRED)
pkg_search_module(GLIB REQUIRED glib-2.0) pkg_search_module(GLIB REQUIRED glib-2.0)
target_include_directories(donar PRIVATE ${GLIB_INCLUDE_DIRS}) target_include_directories(donar PRIVATE ${GLIB_INCLUDE_DIRS})
target_link_libraries(donar ${GLIB_LDFLAGS}) target_link_libraries(donar ${GLIB_LDFLAGS})
target_include_directories(measlat PRIVATE ${GLIB_INCLUDE_DIRS})
target_link_libraries(measlat ${GLIB_LDFLAGS})
install(TARGETS donar install(TARGETS donar measlat
RUNTIME DESTINATION bin RUNTIME DESTINATION bin
LIBRARY DESTINATION lib) LIBRARY DESTINATION lib)

View file

@ -80,7 +80,7 @@ void evt_core_add_fd(struct evt_core_ctx* ctx, char* name, int fd) {
} }
g_array_append_val (cat->socklist, fd); g_array_append_val (cat->socklist, fd);
g_hash_table_insert(ctx->socklist, key, cat); // broken g_hash_table_insert(ctx->socklist, key, cat);
add_fd_to_epoll(ctx->epollfd, fd, cat->flags); add_fd_to_epoll(ctx->epollfd, fd, cat->flags);
} }

13
src/meas_lat.c Normal file
View file

@ -0,0 +1,13 @@
#include <stdlib.h>
#include <stdio.h>
#include "evt_core.h"
int main(void) {
struct evt_core_ctx evts = {0};
struct evt_core_cat udp_read = {};
struct evt_core_cat timer = {};
evt_core_init(&evts);
return 0;
}