mirror of
https://github.com/wg/wrk
synced 2025-02-16 00:12:53 +08:00
eliminate uses of reserved identifiers
This commit is contained in:
parent
68ccc0ce68
commit
ae9777b78d
@ -1,6 +1,6 @@
|
|||||||
#ifndef __APRINTF_H
|
#ifndef APRINTF_H
|
||||||
#define __APRINTF_H
|
#define APRINTF_H
|
||||||
|
|
||||||
char *aprintf(char **, const char *, ...);
|
char *aprintf(char **, const char *, ...);
|
||||||
|
|
||||||
#endif /* __APRINTF_H */
|
#endif /* APRINTF_H */
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#ifndef __CONFIG_H
|
#ifndef CONFIG_H
|
||||||
#define __CONFIG_H
|
#define CONFIG_H
|
||||||
|
|
||||||
#if defined(__FreeBSD__) || defined(__APPLE__)
|
#if defined(__FreeBSD__) || defined(__APPLE__)
|
||||||
#define HAVE_KQUEUE
|
#define HAVE_KQUEUE
|
||||||
@ -8,4 +8,4 @@
|
|||||||
#define _POSIX_C_SOURCE 200809L
|
#define _POSIX_C_SOURCE 200809L
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif /* __CONFIG_H */
|
#endif /* CONFIG_H */
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#ifndef __STATS_H
|
#ifndef STATS_H
|
||||||
#define __STATS_H
|
#define STATS_H
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
int samples;
|
int samples;
|
||||||
@ -17,5 +17,5 @@ long double stats_mean(stats *);
|
|||||||
long double stats_stdev(stats *stats, long double);
|
long double stats_stdev(stats *stats, long double);
|
||||||
long double stats_within_stdev(stats *, long double, long double, uint64_t);
|
long double stats_within_stdev(stats *, long double, long double, uint64_t);
|
||||||
|
|
||||||
#endif /* __STATS_H */
|
#endif /* STATS_H */
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#ifndef __UNITS_H
|
#ifndef UNITS_H
|
||||||
#define __UNITS_H
|
#define UNITS_H
|
||||||
|
|
||||||
char *format_binary(long double);
|
char *format_binary(long double);
|
||||||
char *format_metric(long double);
|
char *format_metric(long double);
|
||||||
@ -7,5 +7,4 @@ char *format_time_us(long double);
|
|||||||
|
|
||||||
int scan_metric(char *, uint64_t *);
|
int scan_metric(char *, uint64_t *);
|
||||||
|
|
||||||
#endif /* __UNITS_H */
|
#endif /* UNITS_H */
|
||||||
|
|
||||||
|
@ -145,7 +145,7 @@ int main(int argc, char **argv) {
|
|||||||
uint64_t start = time_us();
|
uint64_t start = time_us();
|
||||||
uint64_t complete = 0;
|
uint64_t complete = 0;
|
||||||
uint64_t bytes = 0;
|
uint64_t bytes = 0;
|
||||||
errors_t errors = { 0 };
|
errors errors = { 0 };
|
||||||
|
|
||||||
for (int i = 0; i < cfg.threads; i++) {
|
for (int i = 0; i < cfg.threads; i++) {
|
||||||
thread *t = &threads[i];
|
thread *t = &threads[i];
|
||||||
|
14
src/wrk.h
14
src/wrk.h
@ -1,5 +1,5 @@
|
|||||||
#ifndef __WRK_H
|
#ifndef WRK_H
|
||||||
#define __WRK_H
|
#define WRK_H
|
||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#include <pthread.h>
|
#include <pthread.h>
|
||||||
@ -25,7 +25,7 @@ typedef struct {
|
|||||||
uint32_t write;
|
uint32_t write;
|
||||||
uint32_t status;
|
uint32_t status;
|
||||||
uint32_t timeout;
|
uint32_t timeout;
|
||||||
} errors_t;
|
} errors;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
pthread_t thread;
|
pthread_t thread;
|
||||||
@ -36,11 +36,11 @@ typedef struct {
|
|||||||
uint64_t bytes;
|
uint64_t bytes;
|
||||||
uint64_t start;
|
uint64_t start;
|
||||||
tinymt64_t rand;
|
tinymt64_t rand;
|
||||||
errors_t errors;
|
errors errors;
|
||||||
struct _connection *cs;
|
struct connection *cs;
|
||||||
} thread;
|
} thread;
|
||||||
|
|
||||||
typedef struct _connection {
|
typedef struct connection {
|
||||||
thread *thread;
|
thread *thread;
|
||||||
http_parser parser;
|
http_parser parser;
|
||||||
int fd;
|
int fd;
|
||||||
@ -72,4 +72,4 @@ static int parse_args(struct config *, char **, char **, int, char **);
|
|||||||
static void print_stats_header();
|
static void print_stats_header();
|
||||||
static void print_stats(char *, stats *, char *(*)(long double));
|
static void print_stats(char *, stats *, char *(*)(long double));
|
||||||
|
|
||||||
#endif /* __WRK_H */
|
#endif /* WRK_H */
|
||||||
|
Loading…
Reference in New Issue
Block a user