Mercurial
comparison third_party/wrk/src/main.h @ 186:8cf4ec5e2191 hg-web
Fixed merge conflict.
| author | MrJuneJune <me@mrjunejune.com> |
|---|---|
| date | Fri, 23 Jan 2026 22:38:59 -0800 |
| parents | 94705b5986b3 |
| children |
comparison
equal
deleted
inserted
replaced
| 176:fed99fc04e12 | 186:8cf4ec5e2191 |
|---|---|
| 1 #ifndef MAIN_H | |
| 2 #define MAIN_H | |
| 3 | |
| 4 #include <ctype.h> | |
| 5 #include <errno.h> | |
| 6 #include <fcntl.h> | |
| 7 #include <getopt.h> | |
| 8 #include <math.h> | |
| 9 #include <netinet/in.h> | |
| 10 #include <netinet/tcp.h> | |
| 11 #include <stdarg.h> | |
| 12 #include <stdbool.h> | |
| 13 #include <stdio.h> | |
| 14 #include <stdlib.h> | |
| 15 #include <string.h> | |
| 16 #include <signal.h> | |
| 17 #include <time.h> | |
| 18 #include <unistd.h> | |
| 19 #include <sys/time.h> | |
| 20 #include <sys/uio.h> | |
| 21 | |
| 22 #include "ssl.h" | |
| 23 #include "aprintf.h" | |
| 24 #include "stats.h" | |
| 25 #include "units.h" | |
| 26 #include "zmalloc.h" | |
| 27 | |
| 28 struct config; | |
| 29 | |
| 30 static void *thread_main(void *); | |
| 31 static int connect_socket(thread *, connection *); | |
| 32 static int reconnect_socket(thread *, connection *); | |
| 33 | |
| 34 static int record_rate(aeEventLoop *, long long, void *); | |
| 35 | |
| 36 static void socket_connected(aeEventLoop *, int, void *, int); | |
| 37 static void socket_writeable(aeEventLoop *, int, void *, int); | |
| 38 static void socket_readable(aeEventLoop *, int, void *, int); | |
| 39 | |
| 40 static int response_complete(http_parser *); | |
| 41 static int header_field(http_parser *, const char *, size_t); | |
| 42 static int header_value(http_parser *, const char *, size_t); | |
| 43 static int response_body(http_parser *, const char *, size_t); | |
| 44 | |
| 45 static uint64_t time_us(); | |
| 46 | |
| 47 static int parse_args(struct config *, char **, struct http_parser_url *, char **, int, char **); | |
| 48 static char *copy_url_part(char *, struct http_parser_url *, enum http_parser_url_fields); | |
| 49 | |
| 50 static void print_stats_header(); | |
| 51 static void print_stats(char *, stats *, char *(*)(long double)); | |
| 52 static void print_stats_latency(stats *); | |
| 53 | |
| 54 #endif /* MAIN_H */ |