#include "config.h"
#include <signal.h>
#include "util/log.h"
#include "util/locks.h"
#include "util/net_help.h"
#include "util/data/msgencode.h"
#include "util/data/msgreply.h"
#include "util/data/msgparse.h"
Data Structures | |
struct | perfinfo |
Global info for perf. More... | |
struct | perfio |
I/O port for perf. More... | |
Defines | |
#define | START_IO_INTERVAL 10 |
number of msec between starting io ports | |
#define | IO_TIMEOUT 10 |
number of msec timeout on io ports | |
Functions | |
static void | usage (char *nm) |
usage information for perf | |
static RETSIGTYPE | perf_sigh (int sig) |
signal handler for user quit | |
static int | perf_tv_smaller (struct timeval *t1, struct timeval *t2) |
timeval compare, t1 < t2 | |
static void | perf_tv_add (struct timeval *t1, struct timeval *t2) |
timeval add, t1 += t2 | |
static void | perf_tv_subtract (struct timeval *t1, struct timeval *t2) |
timeval subtract, t1 -= t2 | |
static void | perfsetup (struct perfinfo *info) |
setup perf test environment | |
static void | perffree (struct perfinfo *info) |
cleanup perf test environment | |
static void | perfsend (struct perfinfo *info, size_t n, struct timeval *now) |
send new query for io | |
static void | perfreply (struct perfinfo *info, size_t n, struct timeval *now) |
got reply for io | |
static void | perftimeout (struct perfinfo *info, size_t n, struct timeval *now) |
got timeout for io | |
static void | stat_printout (struct perfinfo *info, struct timeval *now, struct timeval *elapsed) |
print nice stats about qps | |
static void | perfselect (struct perfinfo *info) |
wait for new events for performance test | |
static void | perfendstats (struct perfinfo *info) |
show end stats | |
static void | perfmain (struct perfinfo *info) |
perform the performance test | |
static int | qlist_parse_line (ldns_buffer *buf, char *p) |
parse a query line to a packet into buffer | |
static void | qlist_grow_capacity (struct perfinfo *info) |
grow query list capacity | |
static void | qlist_add_line (struct perfinfo *info, char *line, int no) |
setup query list in info | |
static void | qlist_read_file (struct perfinfo *info, char *fname) |
setup query list in info | |
int | main (int argc, char *argv[]) |
main program for perf | |
Variables | |
static struct perfinfo * | sig_info |
signal handler global info | |
int | optind |
getopt global, in case header files fail to declare it. | |
char * | optarg |
getopt global, in case header files fail to declare it. |
int optind |
getopt global, in case header files fail to declare it.
char* optarg |
getopt global, in case header files fail to declare it.