struct timespec last_printed;
// Total number of open connections
- unsigned int connections;
+ unsigned int open_connections;
size_t bytes_sent;
size_t total_bytes_sent;
while (!conf->terminated && !timeout_expired) {
// Open connections
- while (stats.connections < conf->parallel) {
+ while (stats.open_connections < conf->parallel) {
int fd = open_connection(conf);
if (fd < 0)
continue;
goto ERROR;
}
- stats.connections++;
+ stats.open_connections++;
}
int fds = epoll_wait(epollfd, events, EPOLL_MAX_EVENTS, -1);
close(fd);
- stats.connections--;
+ stats.open_connections--;
} else if (events[i].events & EPOLLOUT) {
r = send_data_to_server(conf, &stats, fd, pool);
struct timespec last_printed;
// Total number of open connections
- unsigned int connections;
+ unsigned int open_connections;
size_t bytes_received;
size_t total_bytes_received;
INFO( conf, "--- %s --------------------\n", timestamp);
DEBUG(conf, " %-20s: %19.4fs\n", "Delta", delta);
- INFO( conf, " %-20s: %20u\n", "Open Connection(s)", stats->connections);
+ INFO( conf, " %-20s: %20u\n", "Open Connection(s)", stats->open_connections);
INFO( conf, " %-20s: %18s/s\n", "Current Bandwidth", bps);
INFO( conf, " %-20s: %20s\n", "Total Bytes Received", total_bytes_received);
}
// A connection has been opened
- stats.connections++;
+ stats.open_connections++;
// Handle timer events
} else if (fd == timerfd) {
close(fd);
// This connection is now closed
- stats.connections--;
+ stats.open_connections--;
// Skip processing anything else, because it would be pointless
continue;