More cleanup
This commit is contained in:
@@ -239,7 +239,6 @@ add_executable(load_tester tools/load_tester.cpp)
|
||||
target_link_libraries(load_tester Threads::Threads llhttp_static perfetto)
|
||||
|
||||
add_test(NAME arena_allocator_tests COMMAND test_arena_allocator)
|
||||
add_test(NAME connection_registry_tests COMMAND test_connection_registry)
|
||||
add_test(NAME commit_request_tests COMMAND test_commit_request)
|
||||
add_test(NAME http_handler_tests COMMAND test_http_handler)
|
||||
add_test(NAME server_connection_return_tests
|
||||
|
||||
@@ -48,7 +48,7 @@ template <class T> struct ThreadPipeline {
|
||||
// Constructor
|
||||
// lgSlotCount: log2 of ring buffer size (e.g., 10 -> 1024 slots)
|
||||
// threadsPerStage: number of threads for each stage (e.g., {1, 4, 2} = 1
|
||||
// producer, 4 stage-1 workers, 2 stage-2 workers)
|
||||
// stage-0 worker, 4 stage-1 workers, 2 stage-2 workers)
|
||||
ThreadPipeline(int lgSlotCount, const std::vector<int> &threadsPerStage)
|
||||
: slotCount(1 << lgSlotCount), slotCountMask(slotCount - 1),
|
||||
threadState(threadsPerStage.size()), ring(slotCount) {
|
||||
@@ -228,9 +228,9 @@ private:
|
||||
return safeLen;
|
||||
}
|
||||
|
||||
struct alignas(128) ThreadState {
|
||||
struct ThreadState {
|
||||
// Where this thread has published up to
|
||||
std::atomic<uint32_t> pops{0};
|
||||
alignas(128) std::atomic<uint32_t> pops{0};
|
||||
// Where this thread will publish to the next time it publishes
|
||||
uint32_t localPops{0};
|
||||
// Where the previous stage's threads have published up to last we checked
|
||||
|
||||
@@ -5,8 +5,6 @@
|
||||
#include <errno.h>
|
||||
#include <limits.h>
|
||||
|
||||
// TODO fix up this whole thing
|
||||
|
||||
Connection::Connection(struct sockaddr_storage addr, int fd, int64_t id,
|
||||
size_t epoll_index, ConnectionHandler *handler,
|
||||
Server &server)
|
||||
|
||||
Reference in New Issue
Block a user