ebpf的主从同步实现,QPS测试与内存池QPS测试。

This commit is contained in:
1iaan
2026-01-30 16:00:06 +00:00
parent 2bdb48d63d
commit fbdcff6878
23 changed files with 599 additions and 383 deletions

View File

@@ -1,5 +1,6 @@
#include "kvstore.h"
#include "diskuring/diskuring.h"
#include "kvs_dump.h"
#include <unistd.h>
#include <arpa/inet.h>
#include <sys/socket.h>
@@ -39,10 +40,6 @@ int kvs_create_snapshot(iouring_ctx_t *uring, const char* array_file, const char
return ret;
}
void __complete_snapshot(const char *ip, int port, const char *array_file, const char *rbtree_file, const char *hash_file){
}
static int send_file_to_ipport(const char *ip, int port, const char *filename) {
int sockfd = socket(AF_INET, SOCK_STREAM, 0);
if (sockfd < 0) { perror("socket"); return -1; }
@@ -119,9 +116,6 @@ int kvs_create_snapshot_async(const char *ip, int port){
_exit(1);
}
// hook 通知 eBPF
__complete_snapshot(ip, port, tmp_array, tmp_rbtree, tmp_hash);
iouring_shutdown(&uring);
_exit(0);
} else {