Rewrite IPv4 Turf War backend

It can now handle 240k SQLite write QPS at 3ms 99 percentile latency.
We're still working out the kinks since it's brand new. But we've got
this running in production already!
This commit is contained in:
Justine Tunney 2022-10-03 08:17:37 -07:00
parent ccbae7799e
commit 91e167caaf
No known key found for this signature in database
GPG key ID: BE714B4575D6E328
11 changed files with 1021 additions and 6 deletions

View file

@ -17,9 +17,10 @@
PERFORMANCE OF THIS SOFTWARE.
*/
#include "libc/atomic.h"
#include "libc/dce.h"
#include "libc/intrin/atomic.h"
#include "libc/mem/mem.h"
#include "libc/mem/gc.internal.h"
#include "libc/mem/mem.h"
#include "libc/testlib/testlib.h"
#include "libc/thread/spawn.h"
#include "libc/thread/thread.h"
@ -54,3 +55,11 @@ TEST(pthread_once, test) {
ASSERT_EQ(1, atomic_load(&y));
ASSERT_EQ(0, pthread_barrier_destroy(&b));
}
__attribute__((__constructor__)) static void init(void) {
// try to test both the nsync and non-nsync versions with regular builds
if (!IsTiny()) {
pthread_cond_t c = {0};
pthread_cond_broadcast(&c);
}
}